in reply to problem with 'strftime' on unix systems
Ok, so I have accepted that strftime on sol10 and sol8 does not support %s :(
Also, the reason why I convert epoch seconds to epoch seconds (which doesn't change anything) is because the format is defined by the user, it can be anything.
Anyway I think I have to solve it like this (I don't have much time)
Thnx
LuCa
Also, the reason why I convert epoch seconds to epoch seconds (which doesn't change anything) is because the format is defined by the user, it can be anything.
Anyway I think I have to solve it like this (I don't have much time)
Looks OK to me !?!#!/usr/bin/perl -lw use strict ; use POSIX 'strftime' ; my $fmt ; $fmt = <STDIN> ; chomp($fmt) ; my $time = time() ; if ( $fmt eq "%s") { print $time } else { print strftime $fmt, $time }
Thnx
LuCa
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: problem with 'strftime' on unix systems
by gellyfish (Monsignor) on Oct 23, 2006 at 14:08 UTC | |
Re^2: problem with 'strftime' on unix systems
by Anonymous Monk on Oct 23, 2006 at 14:11 UTC |
In Section
Seekers of Perl Wisdom