Re: Display Dates in English o_O

From: Date: Fri, 17 Jan 2003 11:07:44 +0000
Subject: Re: Display Dates in English o_O
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-131984@lists.php.net to get a copy of this message
Hi, Friday, January 17, 2003, 11:16:53 AM, you wrote: S> I have a PHP driven site that as a time schedule. Since the site isn't exactly filled S> with very intellagent people who just LOVE to translate times and dates from a weird format (Such as S> the S> format used in MySQL), I'd like to take these from a MySQL table (the table's types S> are DATE and TIME) and translate the date to something like "Thrusday, January 16th, 2003" S> when the date strate S> from the table is "2003-01-16." Then with time, I'd like it to read something S> like "8:00 PM" when it reads straight from the table "20:00:00." Another feature S> I'd like to have it timezones but S> that's not the point of this message. If you don't mind, though, could you also tell S> me how to configure the times according the the timezone a user has chosen? S> Thanks, S> Stephen Craton S> http://www.melchior.us S> "What's the point in appearance if your true love, doesn't care about it?" S> -- http://www.melchior.us What you could do is use javascript to get the clients local time, compare it with the server time and get a difference. Then get all dates from mysql as a unix timestamp, apply the difference then use date() to format it as you want and it will always match the clients time on their computer...even if they have it wrong :) -- regards, Tom

« previous php.general (#131984) next »