Welcome! Log In Create A New Profile

Advanced

Re: convert $msec to sec

Anoop Alias
April 03, 2016 11:12AM
Thanks Valentin. That works.

Can you explain

On Sun, Apr 3, 2016 at 6:10 PM, Валентин Бартенев <vbart@nginx.com> wrote:

> On Sunday 03 April 2016 11:31:08 Anoop Alias wrote:
> > I need to log the seconds since epoch (without the millisecond
> resolution)
> > in the access_log file
> >
> > is there is a way to convert the $msec to seconds or drop the exponential
> > part of the time . Probably using the map function?.
> >
>
> It's easy with the map directive:
>
> map $msec $sec {
> ~^(?P<_sec>.+)\. $_sec;
> }
>
>
> wbr, Valentin V. Bartenev
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>



--
*Anoop P Alias*
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

convert $msec to sec

Anoop Alias April 03, 2016 02:02AM

Re: convert $msec to sec

Валентин Бартенев April 03, 2016 08:42AM

Re: convert $msec to sec

Anoop Alias April 03, 2016 11:12AM

Re: convert $msec to sec

Igal @ Lucee.org April 03, 2016 11:14AM

Re: convert $msec to sec

Валентин Бартенев April 03, 2016 04:26PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 185
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready