[MojoMojo] Setting time zone

Mateu X. Hunter hunter at missoula.org
Thu Feb 10 19:13:34 GMT 2011


In  root/base/page/recent.tt one can find this:

    [% page.content.created.hms(":") %]

It could be changed to use Template::Plugin::Date like so

  [% USE date(format =3D '%H:%M:%S') %]
  [% date.format(page.content.created.epoch) %]

For me this changed the time from UTC to Local, but one could always add the
offset manually if need be like:

  [% SET two_hours =3D 7200 %]
  [% date.format(page.content.created.epoch - two_hours) %]


- mateu


2011/2/10 Marcus Ramberg <marcus at nordaaker.com>

>  Hi. I am afraid there is no explicit time zone support in MojoMojo at the
> moment. It will display whatever timezone your server is set up with.
> Patches are welcome to improve this.
>
> --
> Marcus Ramberg
> Chief Yak Shaver
> Nordaaker Consulting
>
> On Monday, February 7, 2011 at 6:53 PM, Russell McOrmond wrote:
>
> This may be a silly question, but what is the right method to set the
> timezone in a way that MojoMojo will pick it up? Currently all times
> are displayed as UTC, and I want to set to the local time zone.
>
> Thank you
>
> _______________________________________________
> Mojomojo mailing list
> Mojomojo at lists.scsys.co.uk
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/mojomojo
>
>
>
> _______________________________________________
> Mojomojo mailing list
> Mojomojo at lists.scsys.co.uk
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/mojomojo
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/mojomojo/attachments/20110210/79f0d=
ef9/attachment.htm


More information about the Mojomojo mailing list