create new tag
, view all tags

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;


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

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2002-03-23 - RichardDonkin
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.