Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Issue with Mountian timezone [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
brent_weaver
Guru
Guru


Joined: 01 Jul 2004
Posts: 501
Location: Burlington, VT

PostPosted: Thu Mar 14, 2013 11:26 pm    Post subject: Issue with Mountian timezone [SOLVED] Reply with quote

What is the best way to set the timezone in a process to be Mountian?

Here is a script that does not seem to work:

Code:

#!/usr/bin/perl

use POSIX qw( strftime );

print "Local = ".strftime("%r",localtime()) . "\n";
$ENV{'TZ'} = "/usr/share/zoneinfo/US/Mountian";
print "Mountian = ".strftime("%r",localtime()) . "\n";
mybox ~ # ./tst
Local = 07:18:49 PM
Mountian = 11:18:49 PM


Why is this not showing as 05:18? What am I doing wrong. I basically need to set timezone in a perl script and I can get the other US timezones to work correctly but not Mountian. I have played with this on multiple distro's (g2 of course) and it behaves the same way. Perhaps I am missing something?

Any help would be greatly appreciated!
_________________
Brent Weaver


Last edited by brent_weaver on Fri Mar 15, 2013 12:30 am; edited 1 time in total
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 7403
Location: Somewhere over Atlanta, Georgia

PostPosted: Thu Mar 14, 2013 11:38 pm    Post subject: Reply with quote

Spelling error, if nothing else. Change "Mountian" to "Mountain". That's the most probebul explunashun. :wink: Unless this is a time zone only used by the Royal Canadian Mounted Police? :D

Also, I don't think you need the whole pathname. "US/Mountain" should work.

- John
_________________
This space intentionally left blank.
Back to top
View user's profile Send private message
brent_weaver
Guru
Guru


Joined: 01 Jul 2004
Posts: 501
Location: Burlington, VT

PostPosted: Fri Mar 15, 2013 12:29 am    Post subject: Reply with quote

This is SOOO classic! When I read this my kids heard me howl out laughing and came running... I had to explain to a 5th and 3rd grader that I spelled Mountain wrong...

Thank you for helping me with my native language :)

This is soo awesome!
_________________
Brent Weaver
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum