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.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
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.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!