Hi,
I'm trying to convert a date - but its just refusing to work :/
Example value for $ssl_exp_date is: Aug 14 23:59:59 2009 GMT
The code I'm trying is:
$ssl_exp_date =~ s/ GMT//;
# Aug 14 23:59:59 2009
my $old_format = '%mmm% %dd% %hh%:%mm%%:%ss% %yyyy%';
my $new_format = '%yyyy%-%mm%-%dd%';
I've trimmed the \n from $ssl_exp_date, as that existed from openssl - and then removed GMT, just in case that was throwing it off.
I'm sure I've just missed something *really* simple - but I can't spot it :(
Any suggestions are welcome.
TIA
Andy (mod)
andy@ultranerds.com
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
I'm trying to convert a date - but its just refusing to work :/
Example value for $ssl_exp_date is: Aug 14 23:59:59 2009 GMT
The code I'm trying is:
Code:
$ssl_exp_date =~ s/\n//; $ssl_exp_date =~ s/ GMT//;
# Aug 14 23:59:59 2009
my $old_format = '%mmm% %dd% %hh%:%mm%%:%ss% %yyyy%';
my $new_format = '%yyyy%-%mm%-%dd%';
I've trimmed the \n from $ssl_exp_date, as that existed from openssl - and then removed GMT, just in case that was throwing it off.
I'm sure I've just missed something *really* simple - but I can't spot it :(
Any suggestions are welcome.
TIA
Andy (mod)
andy@ultranerds.com
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates


