RetroBSD

2.11BSD operating system for microcontrollers
It is currently Tue Feb 25, 2020 6:58 pm

All times are UTC




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: timezone - issue
PostPosted: Mon Oct 19, 2015 6:30 am 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
Probably the same issue with timezones as in LiteBSD.

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
 Post subject: Re: timezone - issue
PostPosted: Fri Oct 23, 2015 6:25 pm 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
Retrobsd, 417 filesystem.
Code:
# date
Fri Oct 23 10:20:53 PST 2015
# date -u     
Fri Oct 23 18:20:59 GMT 2015                           <<<<<< my RTC is set to GMT
# TZ="CET"
# export TZ
# date
Fri Oct 23 10:21:25 PST 2015
#

I did with a
Code:
ln -s /share/zoneinfo/CET /etc/localtime

too, but still
Code:
# date
Fri Oct 23 19:05:43 GMT 2015                                     <<< from my RTC
# TZ=CET
# export TZ
# date
Fri Oct 23 19:06:01 GMT 2015
# ln -s /share/zoneinfo/CET /etc/localtime
/etc/localtime: File exists
# rm /etc/localtime
# ln -s /share/zoneinfo/CET /etc/localtime
# date
Fri Oct 23 19:06:50 GMT 2015
# TZ="CET"
# export TZ
# date
Fri Oct 23 19:07:13 GMT 2015
#


Hmm, how to set CET?
PS: It seems the CET file (and many others) is filled with NULLs only..

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
 Post subject: Re: timezone - issue
PostPosted: Sat Oct 24, 2015 7:45 am 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
I did following transplantation:
1. from LiteBSD I downloaded (via Kermit) the CET file (773bytes)
2. I removed the CET file (44bytes) from the /share/zoneinfo (in RetroBSD)
3. I uploaded (via sz) the "good" CET file (773bytes) into the /share/zoneinfo (in Retrobsd).

Both systems live and online during the surgery.

Probably the first operation of this kind :)

Now it seems it works:
Code:
# TZ=CET
# export TZ
# date
Sat Oct 24 09:39:07 CEST 2015
# date -u
Sat Oct 24 07:40:37 GMT 2015
#

Maybe the files in share/zoneinfo are all corrupt (as the LiteBSD files are all ~10x bigger).
;)

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
 Post subject: Re: timezone - issue
PostPosted: Sun Oct 25, 2015 5:45 am 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
Confirmed, it works :)
Code:
# date
Sun Oct 25 06:40:43 CET 2015
# date -u
Sun Oct 25 05:40:57 GMT 2015
#

DST has changed today..
PS: but still there is the bug with the zoneinfo files..

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
 Post subject: Re: timezone - issue
PostPosted: Mon Oct 26, 2015 12:32 am 
Committer
User avatar

Joined: Wed Oct 10, 2012 11:01 pm
Posts: 1081
Location: Sunnyvale, CA
Pito wrote:
Confirmed, it works :)
Code:
# date
Sun Oct 25 06:40:43 CET 2015
# date -u
Sun Oct 25 05:40:57 GMT 2015
#

DST has changed today..
Good!
Here in U.S., the daylight saving time ends a week later.

Pito wrote:
PS: but still there is the bug with the zoneinfo files..
Turned out, it was a bug in zoneinfo compiler. It worked properly on Linux64 and Mac, but not on Linux32. Fixed in rev418. Thank you for reporting this bug.


Top
 Profile  
 
 Post subject: Re: timezone - issue
PostPosted: Wed Nov 04, 2015 2:46 pm 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
When I set TZ in rc it shows proper local time during the boot splash screen.
Then I login as the root - and the date shows pacific time, so I have to set the TZ again at the prompt.
So I set the TZ in rc.local too, but still it shows pacific time after the login..
Where else shall I set the TZ?

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
 Post subject: Re: timezone - issue
PostPosted: Wed Nov 04, 2015 3:40 pm 
Committer
User avatar

Joined: Thu Oct 11, 2012 8:45 am
Posts: 1801
Location: Room 217, Floor 8, Arm 8, Wheel S7, Mars Base Alpha 3
try /etc/profile

_________________
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".


Top
 Profile  
 
 Post subject: Re: timezone - issue
PostPosted: Wed Nov 04, 2015 4:55 pm 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
There is no /etc/profile, but with the top .profile it did the trick. Thanks!

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
 Post subject: Re: timezone - issue
PostPosted: Wed Nov 04, 2015 5:12 pm 
Committer
User avatar

Joined: Thu Oct 11, 2012 8:45 am
Posts: 1801
Location: Room 217, Floor 8, Arm 8, Wheel S7, Mars Base Alpha 3
The top .profile is root's personal .profile.

In theory /etc/profile should be global to all users. If it's not there create it - it *may* work.

_________________
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".


Top
 Profile  
 
 Post subject: Re: timezone - issue
PostPosted: Thu Nov 05, 2015 9:15 am 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
It seems it works with /etc/profile..

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron




Powered by phpBB® Forum Software © phpBB Group

BSD Daemon used with permission