Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Time::Piece epoch parsing

by pme (Prior)
on Jul 01, 2016 at 14:27 UTC ( #1166999=note: print w/replies, xml ) Need Help??


in reply to Time::Piece epoch parsing

Hi vsespb,

strptime() called from language C gives the very same result.

/* cc -Wall -g strp.c -o strp */ #define _XOPEN_SOURCE #include <time.h> #include <stdio.h> int main(int argc, char *argv[]) { struct tm tm; char *c; c = strptime(argv[1], "%s", &tm); printf("%s", asctime(&tm)); return 0; }
Run:
$ TZ=MSK ./strp 1415998800 Fri Nov 14 21:00:00 2014

Replies are listed 'Best First'.
Re^2: Time::Piece epoch parsing
by Anonymous Monk on Jul 01, 2016 at 15:56 UTC

    Not really:

    $ TZ=Europe/Moscow ./strp 1415998800 Sat Nov 15 00:00:00 2014

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1166999]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (8)
As of 2018-07-17 10:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (363 votes). Check out past polls.

    Notices?