Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    my $dt = DateTime->from_epoch( epoch => $epoch );
    $dt->set_time_zone( timezone( 0, 'N' ) );
    print $dt->strftime( '%Y-%m-%d %H:%M:%S' ), $/;
    
  2. or download this
    $dt->set_time_zone( timezone( 0, 'N' ) );
    
  3. or download this
    $dt->set_time_zone( timezone( -5, 'Y' ) ); # Central with DST
    $dt->set_time_zone( timezone( -6, 'N' ) ); # Eastern without DST
    $dt->set_time_zone( timezone( -6, 'Y' ) ); # Eastern with DST
    
  4. or download this