WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [SOLVED] Confusing Local Time  (Read 13418 times)

Offline ordep

  • Jr. Member
  • **
  • Posts: 74
[SOLVED] Confusing Local Time
« on: July 13, 2012, 09:33:04 PM »
I have not yet been able to tweak TCL that it will give my local time as
such. TCL insists of naming it UTC. I have followed the instruction of FAQ, 
Wiki, and those posted in the forum. TCL keeps insisting my time is UTC even
if it shows the correct local time. I have wmCalClock set to show UTC time, 
yes it does except it is the local time.

The solution is that after booting I set the time with the date command     
for the localtime and immediately it is set correctly to PHT and and
wmCalClock gives the real UTC time.

I don't mind giving this date command after booting, however, it would be   
nice to have it done by TCL. The command is     

Quote
sudo date -s "H:M"

H for hour and M for minutes. How could that be executed. I tried a number 
of variations on consulting the man date, however, can't get it right.

My BIOS is set to local time which is Asia/Manila or 8 hours ahead  of UTC.

Anyone knows?
« Last Edit: July 24, 2012, 11:12:46 PM by ordep »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14636
Re: Confusing Local Time
« Reply #1 on: July 14, 2012, 01:26:11 AM »
In linux you're meant to set your bios time to utc

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Confusing Local Time
« Reply #2 on: July 14, 2012, 02:38:01 AM »
See boot codes "tz=" and "noutc".
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline ordep

  • Jr. Member
  • **
  • Posts: 74
Re: Confusing Local Time
« Reply #3 on: July 14, 2012, 04:49:03 AM »
In linux you're meant to set your bios time to utc

That is new to me. ;) In 15 years Linux my BIOS was always set to local time and no distro ever gave such  weird time indications.  :D

Offline ordep

  • Jr. Member
  • **
  • Posts: 74
Re: Confusing Local Time
« Reply #4 on: July 14, 2012, 05:34:47 AM »
See boot codes "tz=" and "noutc".

That's how I installed and now again booted from CD and the time
indicated by "date" was 00:15 when local time was in fact 16:15 and tzclock
showed GMT which was wrong as well. On booting tz=Asia/Manila showed as
being accepted. Are we on the same planet?  ;)  I must admit 16 + 8 = 00 on
a clock calculation.  Something somewhere is not right with the time in TCL.

If for TCL I would have to change my BIOS time I rather stay with setting   
the correct time with my "date" command after X started in TCL.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10992
Re: Confusing Local Time
« Reply #5 on: July 14, 2012, 05:52:38 AM »
If linux does not know what is what (and it can't unless the bios is in UTC time), then it usually can't do automatic DST transitions. That's the only thing you'll lose if you set the time manually.
The only barriers that can stop you are the ones you create yourself.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Confusing Local Time
« Reply #6 on: July 14, 2012, 06:36:32 AM »
In fact core was for me the first (and only, so far) linux system where I got automatic DST transitions working seamlessly, and that even with BIOS clock kept in localtime ;)             
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Confusing Local Time
« Reply #7 on: July 14, 2012, 06:49:38 AM »
See boot codes "tz=" and "noutc".

On booting tz=Asia/Manila showed as
being accepted. Are we on the same planet?  ;) 

Nope, we are not ;)

No tz-data with geographical aliases in base, so you have to specify all parameters of the real tz.
Search forum for a post which explains tz very analytically.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11315
Re: Confusing Local Time
« Reply #8 on: July 14, 2012, 11:43:28 AM »
Hi ordep
Reply #26 and #27 in this thread might be helpful:
http://forum.tinycorelinux.net/index.php/topic,5017.msg27012.html#msg27012

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Confusing Local Time
« Reply #9 on: July 14, 2012, 12:04:43 PM »
That is exactly the post which I had in mind - and it has been copied to the wiki in the meantime as article "Time Zone" - which OP implies to have followed instructions of...
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline ordep

  • Jr. Member
  • **
  • Posts: 74
Re: Confusing Local Time
« Reply #10 on: July 14, 2012, 11:57:44 PM »
Thanks all!

Made a new install with correct tz=PHT-8 and noutc. True it now showed the correct local time, yet still calling it stupidly (sorry) UTC.  That means I cannot use wmCalClock to give me the real UTC. 'date' command gives UTC instead of PHT.
 
I give up. Worked on it all morning. I will stay with my "date" command after starting X. BTW then the 'date' command correctly gives PHT: Sun Jul 15 11:44:43 PHT 2012, that is the system knows it. That's after canceling above install.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Confusing Local Time
« Reply #11 on: July 15, 2012, 01:24:44 AM »
To check your real (synced) system time, you can do something like this:
rdate -p nist1-ny.ustiming.org
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10992
Re: Confusing Local Time
« Reply #12 on: July 15, 2012, 06:07:23 AM »
Interesting, since when I just tested "tz=PHT-8 noutc", date gave the bios time and said it was PHT.

Are you sure the boot options are correctly passed? Do they show in "showbootcodes"?
The only barriers that can stop you are the ones you create yourself.

Offline ordep

  • Jr. Member
  • **
  • Posts: 74
Re: Confusing Local Time
« Reply #13 on: July 16, 2012, 03:00:03 AM »
Interesting, since when I just tested "tz=PHT-8 noutc", date gave the bios time and said it was PHT.

Are you sure the boot options are correctly passed? Do they show in "showbootcodes"?

That might be the problem. tz=PHT-8 is not found in extlinux.conf on my HD. However, I made a new install to USB flash drive from CD with TCL-4.5.6 that code is in extlinux.conf on the flash drive. I will attempt a new install on my HD. If I boot from the newly burned CD with cheatcode tz=PHT-8 it does now show the correct local time and command "date" gives correctly PHT.

Offline ordep

  • Jr. Member
  • **
  • Posts: 74
Re: Confusing Local Time
« Reply #14 on: July 17, 2012, 04:09:00 AM »
I think I can confirm now that when TCL is booted from a CD and then trying to intall on a hard drive
the given cheat codes such as noutc, tz= or vga= are ignored or not passed. I tried it 3 times
to make sure I had not made a typing error. Each time the same reult. Time shows as UTC and display
is too large and not vga=791 which I use in my PC.

However, installing to a USB flash drive the cheat codes are passed correctly.