Tags:
create new tag
view all tags

Question

I have noticed that when I create a new topic first thing in the morning, the signature offered to me has yesterday's date. I realized that it is showing me the date in GMT. The edit template uses %DATE%, which indeed gives the date in GMT. That behaviour is not what I would have predicted, given that there is a DisplayTimeValues configuration option, which I had set to servertime.

lib/TWiki.pm has this code:

sub _DATE {
    my $this = shift;
    return TWiki::Time::formatTime(time(), '$day $mon $year', 'gmtime');
}

How about changing it to:

sub _DATE {
    my $this = shift;
    return TWiki::Time::formatTime(time(), '$day $mon $year', $TWiki::cfg{DisplayTimeValues} );
}

If I change this myself, does it break anything?

Or if that changes too much, at least could we have a %DISPLAYDATE% variable that can be used in the edit template?

Environment

TWiki version: TWikiRelease04x01x02
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS:  
Web server:  
Perl version:  
Client OS:  
Web Browser:  
Categories:  

-- RichardWalker - 13 Sep 2007

Answer

ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.

Eminently reasonable. I don't think it will break anything, DATE is only used for display. Raise a bug report in http://develop.twiki.org

-- CrawfordCurrie - 22 Sep 2007

I'm unable to raise a bug report on the develop site. When I press the Save button I get this error:

Assertion failed!
 at /home/twiki4/twikisvn/lib/Assert.pm line 61
   Assert::ASSERT('') called at /home/twiki4/twikisvn/lib/TWiki/Meta.pm line 200
   TWiki::Meta::putKeyed('TWiki::Meta=HASH(0x9ec68a8)', 'FIELD', 'HASH(0x9ee1340)') called at /home/twiki4/twikisvn/lib/TWiki/Form/FieldDefinition.pm line 273
   TWiki::Form::FieldDefinition::populateMetaFromQueryData('TWiki::Form::Label=HASH(0x9ee54f8)', 'CGI=HASH(0x96336d0)', 'TWiki::Meta=HASH(0x9ec68a8)', 'ARRAY(0x9ee09b0)') called at /home/twiki4/twikisvn/lib/TWiki/Form.pm line 441
   TWiki::Form::getFieldValuesFromQuery('TWiki::Form=HASH(0x9f5c55c)', 'CGI=HASH(0x96336d0)', 'TWiki::Meta=HASH(0x9ec68a8)') called at /home/twiki4/twikisvn/lib/TWiki/UI/Save.pm line 222
   TWiki::UI::Save::buildNewTopic('TWiki=HASH(0x961cb3c)', 'save') called at /home/twiki4/twikisvn/lib/TWiki/UI/Save.pm line 513
   TWiki::UI::Save::save('TWiki=HASH(0x961cb3c)') called at /home/twiki4/twikisvn/lib/TWiki/UI.pm line 159
   TWiki::UI::__ANON__() called at /home/twiki4/twikisvn/lib/CPAN/lib//Error.pm line 379
   eval {...} called at /home/twiki4/twikisvn/lib/CPAN/lib//Error.pm line 371
   Error::subs::try('CODE(0x961cde8)', 'HASH(0x9eb6228)') called at /home/twiki4/twikisvn/lib/TWiki/UI.pm line 197
   TWiki::UI::run('CODE(0x9977dbc)', 'save', 1) called

-- RichardWalker - 24 Sep 2007

The bugs site is sometimes broken because of a wrong commit, or because the site is updating. Please try again.

-- ArthurClemens - 24 Sep 2007

  • Tried again this morning - same problem.
  • Tried again just now; worked this time. See Bugs:Item4717

-- RichardWalker - 25 Sep 2007

Closing this questions since it is handled in the Bugs web.

-- PeterThoeny - 18 Oct 2007

Change status to:
Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2007-10-18 - PeterThoeny
 
  • 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-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.