develooper Front page | perl.perl6.language.datetime | Postings from September 2000

Re: RFC 99 (v3) Standardize ALL Perl platforms on UNIX epoch

Thread Previous | Thread Next
Chaim Frenkel
September 13, 2000 21:12
Re: RFC 99 (v3) Standardize ALL Perl platforms on UNIX epoch
Message ID:
>>>>> "AD" == Andy Dougherty <> writes:

AD> In my humble opinion, I think perl's time() ought to just call the C
AD> library's time() function and not waste time mucking with the return
AD> value.  Instead, if the time is to be stored externally for later use by
AD> another program, the programmer should be responsible for converting the
AD> time into a suitably useful and portable format.  Any unilateral choice
AD> made by Perl6 in that regard isn't going to be of any help unless everyone
AD> else (Java, Python, C, etc.) follows along.

Possibly a few functions to make it easy.


	0 		on a unix box
	966770660	on a Mac (Lifted from pudge's previous email)

Then on output. print time()-$Perl::EpochOffset;

One other that might be useful is have strftime() (or something
similar) built-in without having to use POSIX; and the default should
be YYYYMMDDHHMMSS.fffffff, (the ISO format)

I personally prefer to pass around the string representation, more
that perl and unix systems need to handle datetime. (And I find it
easier to read the ISO version than a time in seconds)

Chaim Frenkel					     Nonlinear Knowledge, Inc.				               +1-718-236-0183

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About