Welcome! Log In Create A New Profile

Advanced

can a map + regex be used to generate variables for YYYY-MM-DD-HH?

October 23, 2014 02:00AM
can a map + regex be used to generate variables for YYYY-MM-DD-HH? I cant use 'if' in the location i am trying this.

--

I know i can do:
if ($time_iso8601 ~ "^(\d{4})-(\d{2})-(\d{2})") {
set $year $1;
set $month $2;
set $day $3;
}

or with perl regex:
if ($time_iso8601 ~ "^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})")
{
set $year $1;
set $month $2;
set $day $3;
set $hour $4;
set $minutes $5;
set $seconds $6;
}
Subject Author Posted

can a map + regex be used to generate variables for YYYY-MM-DD-HH?

newnovice October 23, 2014 02:00AM

Re: can a map + regex be used to generate variables for YYYY-MM-DD-HH?

Francis Daly October 23, 2014 05:06PM

Re: can a map + regex be used to generate variables for YYYY-MM-DD-HH?

newnovice October 23, 2014 07:17PM

Re: can a map + regex be used to generate variables for YYYY-MM-DD-HH?

Francis Daly October 24, 2014 03:22AM

Re: can a map + regex be used to generate variables for YYYY-MM-DD-HH?

newnovice October 24, 2014 01:44PM

Re: can a map + regex be used to generate variables for YYYY-MM-DD-HH?

Francis Daly October 24, 2014 02:14PM

Re: can a map + regex be used to generate variables for YYYY-MM-DD-HH?

newnovice October 24, 2014 05:14PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 106
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready