View previous topic :: View next topic |
Author |
Message |
brent_weaver Guru


Joined: 01 Jul 2004 Posts: 510 Location: Burlington, VT
|
Posted: Thu Mar 14, 2013 11:26 pm Post subject: Issue with Mountian timezone [SOLVED] |
|
|
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 |
|
 |
John R. Graham Administrator


Joined: 08 Mar 2005 Posts: 9797 Location: Somewhere over Atlanta, Georgia
|
Posted: Thu Mar 14, 2013 11:38 pm Post subject: |
|
|
Spelling error, if nothing else. Change "Mountian" to "Mountain". That's the most probebul explunashun. Unless this is a time zone only used by the Royal Canadian Mounted Police?
Also, I don't think you need the whole pathname. "US/Mountain" should work.
- John _________________ I can confirm that I have received between 0 and 499 National Security Letters. |
|
Back to top |
|
 |
brent_weaver Guru


Joined: 01 Jul 2004 Posts: 510 Location: Burlington, VT
|
Posted: Fri Mar 15, 2013 12:29 am Post subject: |
|
|
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 |
|
 |
|