Hi, I'm trying to provide localised times for my website users and I'm using the following code
use Time::Local; #if user is english $ENV{TZ} = "CET"; # if the user is spanish $ENV{TZ} = "CET"; # I then have values for a date&time coming out of a column in the database # I use a DATE_FORMAT function in the sql so my datetime comes out like # 2nd March 14:00 # I thought putting this into localtime function of Time::Local module would produce # date and CET time my $localisedstartdatetime = localtime($start); # however print $localisedstartdatetime # this returns epoch time (Thu Jan 1 00:00:00 1970) # when I format the date like # 00, 00 , 14:00:00 , 2, 3, 2003 # i.e seconds, minutes etc; I get same result I know I'm probably not understanding the time format very well, Can anyone advise? Thanks Dermot http://www.musicchoice.co.uk Support Digital Media - Join EDiMA - http://www.edima.org Music Choice Limited (company registration number 2838971) is a company incorporated in England and Wales with its registered office at Fleet House, 57-61 Clerkenwell Road, London EC1M 5LA. ********************************************************************** Information in this email is confidential and may be privileged. It is intended for the addressee only. If you have received it in error, please notify the sender immediately and delete it from your system. You should not otherwise copy it, retransmit it or use or disclose its contents to anyone. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com ********************************************************************** ________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________ _______________________________________________ Perl-Unix-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs