Help for this page

Select Code to Download


  1. or download this
    use DateTime;
    
    my $time = DateTime->now( time_zone => 'America/New_York' );
    $time->set_time_zone( 'Australia/South' );
    print "$time\n";
    
  2. or download this
    my $time = DateTime->new(
        year   => 2007,
    ...
        second => 0,
        time_zone => 'America/New_York',
    );
    
  3. or download this
    [jason@critter ~ 0]$ date
    Fri Dec 28 13:24:04 EST 2007
    # oops, there are two ESTs, one at -0500 and one at +1000/+1100, which
    + one is it?
    [jason@critter ~ 0]$ ls -l /etc/localtime
    lrwxr-xr-x  1 root  wheel  30 Dec  5 12:06 /etc/localtime@ -> /usr/sha
    +re/zoneinfo/US/Eastern