New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gmtime()/localtime() do not use time() #9193
Comments
From abe@ztreet.demon.nlCreated by abeltje@droopy.localperlfunc for gmtime (and localtime) says: This suggests that Perl's time() is used in this case, but it isn't :( #! /usr/bin/perl # from perldoc -f gmtime BEGIN { # time() needs to be redefined first printf "[ empty] %s\n", scalar gmtime( ); Perl Info
|
From @rgsOn 18/01/2008, via RT Abe Timmerman <perlbug-followup@perl.org> wrote:
Documentation reworded as #33095, thanks. |
The RT System itself - Status changed from 'new' to 'open' |
@rgs - Status changed from 'open' to 'resolved' |
From abe@ztreet.demon.nlRafael Garcia-Suarez wrote:
Thank you for picking this up! In the Perl documentation I expect "build-in" to mean "into perl". Hence I'm I didn't send a patch earlier as I am not sure how to word it. Is this better? Inline Patch--- pod/perlfunc.pod.orig 2008-01-28 23:02:42.000000000 +0100
+++ pod/perlfunc.pod 2008-01-28 23:16:18.000000000 +0100
@@ -2751,7 +2751,7 @@
Time, false otherwise.
If EXPR is omitted, C<localtime()> uses the current time (as returned
-by the C<time()> built-in).
+by L<time(3)>).
In scalar context, C<localtime()> returns the ctime(3) value:
Abe |
From @rgsOn 28/01/2008, Abe Timmerman <abe@ztreet.demon.nl> wrote:
Yes, OK, why not. Thanks, applied! |
From RGIERSIG@cpan.orgWhy not just state the gotcha? I think "uses the current time" is clear enough and the user most of the Inline Patch--- pod/perlfunc.pod.orig 2008-01-28 23:02:42.000000000 +0100
+++ pod/perlfunc.pod 2008-01-28 23:16:18.000000000 +0100
@@ -2751,7 +2751,7 @@
Time, false otherwise.
-If EXPR is omitted, C<localtime()> uses the current time (as returned
-by the C<time()> built-in).
+If EXPR is omitted, C<localtime()> uses the current time (but does not
+call the C<time()> built-in).
In scalar context, C<localtime()> returns the ctime(3) value:
|
Migrated from rt.perl.org#49914 (status was 'resolved')
Searchable as RT49914$
The text was updated successfully, but these errors were encountered: