Bug: Signature uses wrong date
I just ran into this on TWiki.org.
Test case
- Edit a page on TWiki.org at 7.30 am GMT
- Signature shown in templated text and for copy/paste has the date of previous day
This is reproducible, and is because of this code in
edit:
my $foo = &TWiki::getLocaldate();
$text =~ s/%DATE%/$foo/go;
Environment
| TWiki version: |
TWiki.org |
| TWiki plugins: |
|
| Server OS: |
|
| Web server: |
|
| Perl version: |
|
| Client OS: |
|
| Web Browser: |
Mozilla 0.9.8 |
--
RichardDonkin - 13 Feb 2002 (generated by template on 14 Feb 2002...)
Fix record
I think this code should use GMT, to be consistent. The real solution is to properly address
SettingCorrectTimeZone for all dates handled by TWiki -
SlashCode has a pretty good system for this so perhaps looking at that would help. This would require authenticated users on view, so perhaps the
UserCookiePlugin or
SessionPlugin would be required for this.
--
RichardDonkin - 14 Feb 2002
Fixed in
TWikiAlphaRelease by creating a new
getGmDate routine that uses
gmtime. The semantics of %DATE% are changed so that it now works in GMT, but it was already marked as deprecated.
--
RichardDonkin - 22 Mar 2002