To simplify the work make {{ #time: H:i | -4 hours }} a template and then put the template in your various pages. Then in November just change the template and the change will be applied to the various pages where the template exists.
-Jim
-----Original Message----- From: Shah, Nikhil [mailto:Nikhil.Shah@lendingtree.com] Sent: Monday, September 10, 2007 3:01 PM To: MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] {{CURRENTTIME}} shows time in UTC
Yup, that is what I am afraid of.
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of KAndreou@rccl.com Sent: Monday, September 10, 2007 14:59 To: MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] {{CURRENTTIME}} shows time in UTC
But, you'll have to change that code once we get out of DST
mediawiki-l-bounces@lists.wikimedia.org wrote on 10-09-2007 14:49:53:
Thanks James for the wonderful and quick research.
Actually {{ #time: H:i | -4 hours }} works
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Sullivan, James (NIH/CIT) [C] Sent: Monday, September 10, 2007 14:09 To: MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] {{CURRENTTIME}} shows time in UTC
I got the following to work on Wikipedia's sandbox giving the correct time for American EST:
{{ #time: H:i | {{CURRENTTIME}} -4 hours }}
This is based on Parser Functions: http://meta.wikimedia.org/wiki/ParserFunctions which is an extension and would need to be installed for the above to work. I assume Wikipedia has this installed and so it worked in the Sandbox.
-Jim
-----Original Message----- From: Sullivan, James (NIH/CIT) [C] Sent: Monday, September 10, 2007 12:36 PM To: MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] {{CURRENTTIME}} shows time in UTC
What do you know ... it doesn't work for me either. {{CURRENTTIME}} gives UTC, according to some help pages I could find (http://en.wikipedia.org/wiki/Help:Variable). It doesn't appear to allow offsets to the answer it gives.
So now I'll join you in asking the question, how can the local time be
displayed on a page?
-Jim
-----Original Message----- From: Shah, Nikhil [mailto:Nikhil.Shah@lendingtree.com] Sent: Monday, September 10, 2007 11:24 AM To: MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] {{CURRENTTIME}} shows time in UTC
Thanks James, This did not work either.
#Set Default Timezone $wgLocaltimezone = "America/New_York"; $oldtz = getenv("TZ"); putenv("TZ=$wgLocaltimezone"); $wgLocalTZoffset = date("Z") / 60; putenv("TZ=$oldtz");
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Sullivan, James (NIH/CIT) [C] Sent: Monday, September 10, 2007 11:15 To: MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] {{CURRENTTIME}} shows time in UTC
Try adding:
# Versions before 1.7.0 used $wgLocalTZoffset as hours (3600 seconds/hour). # After 1.7.0 offset as minutes (60 seconds/minute) $wgLocalTZoffset = date("Z") / 60; putenv("TZ=$oldtz");
-----Original Message----- From: Shah, Nikhil [mailto:Nikhil.Shah@lendingtree.com] Sent: Monday, September 10, 2007 11:08 AM To: MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] {{CURRENTTIME}} shows time in UTC
Thanks Jim,
I have added #Set Default Timezone $wgLocaltimezone = "America/New_York"; $oldtz = getenv("TZ"); putenv("TZ=$wgLocaltimezone");
To the LocalSettings.php
But I keep getting {{CURRENTTIME}} in UTC
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Sullivan, James (NIH/CIT) [C] Sent: Monday, September 10, 2007 10:17 To: MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] {{CURRENTTIME}} shows time in UTC
Check out http://meta.wikimedia.org/wiki/Help:Timezone
-Jim
-----Original Message----- From: Shah, Nikhil [mailto:Nikhil.Shah@lendingtree.com] Sent: Monday, September 10, 2007 9:26 AM To: MediaWiki announcements and site admin list Subject: [Mediawiki-l] {{CURRENTTIME}} shows time in UTC
{{CURRENTTIME}} shows time in UTC, The clock on my server shows time in EDT.
What so I use for showing the local time?
Thanks,
Nikhil _______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
_______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
_______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l