On Feb 4, 2015, at 1:55 PM, $Bill wrote: > > I had a similar situation where I'm in Pacific time and my server is in > Eastern time. > > My solution was to just add this to my BEGIN { } : > $ENV{TZ} = 'PST8PDT'; > to force my time displays to Pacific time.
I didn't think about adding it to a BEGIN block. I just added it to the get_date sub and it seems to work fine. I just didn't know if it was a proper way to do that. I'm using it to make sure that all orders added to the shopping cart are in the store owners timezone and not the server's, if it's different. > I'm not sure what ( $main::global->{'config'}->{'timezone'}; ) gives you in > terms of a timezone. > Is that the compiled in timezone when Perl was built ? Or the dynamic > timezone determined > at runtime from the system ? Or ? I'm using standard timezone names, e.g. America/Los_Angeles. I've setup the configuration script with a drop down list of all timezone names and their offsets ("-8") which then populates the config file. It's then pulled from there. Thanks, Frank SurfShopCART https://github.com/surfshopcart/surfshop -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/