Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Any thoughts?#!/usr/bin/perl -w use strict; use DateTime; use DateTime::TimeZone; use DateTime::Format::MySQL; my $somewhere_time = "2011-06-09 08:19:12"; # pacific time? my $dt = DateTime::Format::MySQL->parse_datetime($somewhere_time); $dt->set_time_zone('UTC'); $dt->set_time_zone('America/New_York'); print DateTime::Format::MySQL->format_datetime($dt),"\n"; # I should be expecting to get: 2011-06-09 10:19:12
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Time Convert Question
by MidLifeXis (Monsignor) on Jun 09, 2011 at 16:04 UTC | |
by Anonymous Monk on Jun 09, 2011 at 17:16 UTC | |
by Anonymous Monk on Jun 09, 2011 at 17:32 UTC | |
by MidLifeXis (Monsignor) on Jun 09, 2011 at 17:51 UTC | |
|
Re: Time Convert Question
by Anonymous Monk on Jun 09, 2011 at 16:50 UTC | |
by Anonymous Monk on Jun 09, 2011 at 18:27 UTC | |
by Anonymous Monk on Jun 10, 2011 at 06:37 UTC |