[Dancer-users] UTC timestamp for logger_format

sawyer x xsawyerx at gmail.com
Thu Apr 12 17:52:10 CEST 2012


Merged, y'all. :)

On Tue, Apr 10, 2012 at 4:01 AM, Alex C <calyx238 at gmail.com> wrote:

> PR: https://github.com/sukria/Dancer/pull/773
>
> Thanks
>
> On 9 April 2012 16:32, damien krotkine <dkrotkine at gmail.com> wrote:
> > I agree with this change, seems a good added feature
> >
> > On 8 April 2012 16:32, David Precious <davidp at preshweb.co.uk> wrote:
> >> On Sat, 7 Apr 2012 21:30:19 +0100
> >> Alex C <calyx238 at gmail.com> wrote:
> >>
> >>> I noticed that Dancer gets its timestamps using localtime(). I prefer
> >>> to have all my logs in UTC.
> >>>
> >>> Please can I suggest the following patch to Dancer::Logger::Abstract
> >>> to provide an option for this?
> >>>
> >>> @@ -94,6 +94,7 @@ sub format_message {
> >>>          t => sub { Encode::decode(setting('charset') || 'utf8',
> >>>                                    POSIX::strftime( "%d/%b/%Y
> >>> %H:%M:%S", localtime )) },
> >>>          T => sub { POSIX::strftime( "%Y-%m-%d %H:%M:%S", localtime
> >>> ) },
> >>> +        U => sub { POSIX::strftime( "%Y-%m-%d %H:%M:%S", gmtime  ) },
> >>>          P => sub { $$ },
> >>>          L => sub { $level },
> >>>          D => sub {
> >>
> >> That sounds pretty sane and worthwhile, I'd support that change.
> >>
> >> If you would like to be credited as an author via GitHub, feel free to
> >> submit a pull request with it; if not, I'll make that change soon,
> >> assuming other devs agree (it's such a simple and sensible addition I
> >> see no reason why anyone would disagree :) ).
> >>
> >>
> >> --
> >> David Precious ("bigpresh") <davidp at preshweb.co.uk>
> >> http://www.preshweb.co.uk/     www.preshweb.co.uk/twitter
> >> www.preshweb.co.uk/linkedin    www.preshweb.co.uk/facebook
> >> www.preshweb.co.uk/cpan        www.preshweb.co.uk/github
> >> _______________________________________________
> >> Dancer-users mailing list
> >> Dancer-users at perldancer.org
> >> http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
> > _______________________________________________
> > Dancer-users mailing list
> > Dancer-users at perldancer.org
> > http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
> _______________________________________________
> Dancer-users mailing list
> Dancer-users at perldancer.org
> http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.backup-manager.org/pipermail/dancer-users/attachments/20120412/493208d3/attachment.htm>


More information about the Dancer-users mailing list