List Info

Thread: Change UTC time




Change UTC time
user name
2006-12-11 10:43:03
Hi,

I have just started cracking away at Venus, moving away from
the buggy 
FeedWordPress and into Venus for a blog aggregator in
Pakistan.  Testing 
venus at http://planet.bloggers.pk soon to replace http://bloggers.pk.

I had a question, is it possible to somehow hack the UTC
time to display 
as +5 GMT localized to the blogger audience in Pakistan?  So
that the 
posts show date & time in Pakistan Standard Time. 
Presently my server 
is located in California and it seems the posts are
displaying the 
server time on the west coast resulting in a time lapse of
over 12 hours

Thanks
-- 
devel mailing list
devellists.planetplanet.org

http://lists.planetplanet.org/mailman/listinfo/devel
Change UTC time
user name
2006-12-11 12:43:27
Dr. Awab Alvi wrote:
I had a question, is it possible to somehow hack the UTC time to display as +5 GMT localized to the blogger audience in Pakistan?  So that the posts show date & time in Pakistan Standard Time. ; Presently my server is located in California and it seems the posts are displaying the server time on the west coast resulting in a time lapse of over 12 hours

Have you tried setting TZ=Asia/Karachi?

Change UTC time
user name
2006-12-11 16:09:15
Short of sounding stupid - can I ask where can I enter this
time zone.

Thanks yet again

Ed Catmur wrote:
> Dr. Awab Alvi wrote:
>> I had a question, is it possible to somehow hack
the UTC time to 
>> display as +5 GMT localized to the blogger audience
in Pakistan?  So 
>> that the posts show date & time in Pakistan
Standard Time.  Presently 
>> my server is located in California and it seems the
posts are 
>> displaying the server time on the west coast
resulting in a time 
>> lapse of over 12 hours
>
> Have you tried setting TZ=Asia/Karachi?
>
-- 
devel mailing list
devellists.planetplanet.org

http://lists.planetplanet.org/mailman/listinfo/devel
Change UTC time
user name
2006-12-12 10:10:28
Dr. Awab Alvi wrote:
Short of sounding stupid - can I ask where can I enter this time zone.

Thanks yet again

Ed Catmur wrote:

Dr. Awab Alvi wrote:
I had a question, is it possible to somehow hack the UTC time to display as +5 GMT localized to the blogger audience in Pakistan?  So that the posts show date & time in Pakistan Standard Time. ; Presently my server is located in California and it seems the posts are displaying the server time on the west coast resulting in a time lapse of over 12 hours

Have you tried setting TZ=Asia/Karachi?

I assume your server has /etc/localtime symlinked to /usr/share/zoneinfo/US/Pacific or similar.  You need to override this so that Planet thinks it's in Pakistan.  You do this using the environment variable TZ.

e.g.

$ env TZ=Asia/Karachi ./planet.py pathto/config.ini

If you're not sure how to set an environment variable I suggest asking your administrator or reading a Unix textbook.

Change UTC time
user name
2006-12-12 12:45:58
Ed Catmur wrote:
> Dr. Awab Alvi wrote:
>> Short of sounding stupid - can I ask where can I
enter this time zone.
>>
>> Thanks yet again
>>
>> Ed Catmur wrote:
>>
>>> Dr. Awab Alvi wrote:
>>>> I had a question, is it possible to somehow
hack the UTC time to 
>>>> display as +5 GMT localized to the blogger
audience in Pakistan?  So 
>>>> that the posts show date & time in
Pakistan Standard Time.  
>>>> Presently my server is located in
California and it seems the posts 
>>>> are displaying the server time on the west
coast resulting in a time 
>>>> lapse of over 12 hours 
>>>
>>> Have you tried setting TZ=Asia/Karachi?
>>>
> I assume your server has /etc/localtime symlinked to 
> /usr/share/zoneinfo/US/Pacific or similar.  You need to
override this so 
> that Planet thinks it's in Pakistan.  You do this using
the environment 
> variable TZ.
> 
> e.g.
> 
> $ env TZ=Asia/Karachi ./planet.py pathto/config.ini
> 
> If you're not sure how to set an environment variable I
suggest asking 
> your administrator or reading a Unix textbook.

As far as I know, both Planet 2.0 and Planet Venus
consistently ignore 
localtime and all processing and formatting is in GMT.

This makes both the assertion that posts are displaying
using the server 
time on the west coast and the assertion that setting the TZ
environment 
variable would fix this are incomprehensible to me.

On my planet, I use JavaScript to convert all times to the
timezone of 
the viewer.

If you are using Venus and XSLT, date:add is available:

     http:/
/exslt.org/date/functions/add/index.html

If somebody wants to patch Venus (with tests!) to add a GMT
time offset, 
I will incorporate such patches.

- Sam Ruby

-- 
devel mailing list
devellists.planetplanet.org

http://lists.planetplanet.org/mailman/listinfo/devel
[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )