Re: DateTime using DateTimeZone Timestamp problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/04/2011 18:02, Ashley Sheridan wrote:

<snip>
> 
> What do you mean it only returns the timestamp for the local system? Did
> you want PHP to know what time the visitors are on? PHP won't know about
> that, all you can do is set the timezone for the script based on some
> information you're receiving from a clients machine, otherwise PHP won't
> know, because it's only run on the server and doesn't know about the
> client machines? Is this what you're trying to do, or did I
> misunderstand?
> 
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk

Hi,

I want the code to return the timestamp for the current time in
Singapore.  The format command returns different result if the 'U' for
timestamp is specified.  It also returns the same (wrong) result for
DateTime::getTimestamp() as well.

The clients are booking entry into a place at a specific time, for
example 7am in Singapore on the 12 April. Clients can book right up to
the entry time (if there is space available).  I want to make sure they
are not trying to book in the past.

The booking system is in the UK but clients can book from anywhere.  I
cannot rely on them having the right time on their systems (or being in
the right place). Plus this would mean relying on client supplied data,
which is a no-no ;)

I have previously used a gmt offset, which was good enough as there are
not that many people who book close to the entry time.  But now its time
to improve this and use proper time zone info which can change without
my input.


If no-one can find a problem with my code I will submit it as a bug.

Thanks

Ian
-- 





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux