timezone change with date()


Posted on 16th Feb 2014 07:03 pm by admin

so i put all my times for posts in my made from scratch forum(not phpbb3 or sm)
in my mysql db using the time()
and when i show the time on webpages i use the date('ymd/h:i:s', $time) kind of thing.
now the default timezone is America/New_York for php or whatever
but IM GOING to make a thing upon registering on my site that the user choses what timezone they are in.

now i have two questions.
1. arent there only 24 different timezone hours? (i know theres more names than that.. but does anyone know of 24 main ones so i can get all the zones but not have to have all the cities etc..

2. since im going to be storing the users timezone pick in a mysql db, im going to put their timezone pick in a session variable and then echo it into whatever way im displaying the time or at least i hope i can do that.. so is there someway i can do that.. to show the time in a certain timezone(the choice of the user that ill put in the session var)
?

any help?

100 Like 40 Dislike
Previous php-forum Next php-forum
Other php-forum

Connecion issue
Hi,

For some reason, I keep getting this error when trying to connect:

Warning: mysql_

Create PHP table grid help, please
I have a MySQL database setup, now it's time for the table (gridview) design in php. Here's the prob

SQL Query/echo not working
Hey all,

I'm trying to run (what I thought) was a simple operation and it isn't working. I h

Probably Easy, Need help with Check Boxes in PHP Code
hello,

Thanks for looking this over and helping me out. My problem is I have a online store l

Drawing Images in classes
I'm quite new to Object Oriented PHP. What I'm trying to do is draw some images but also have other

Standard DES encryption script?
Can anybody point me to a tutorial or a short script that shows how to encrypt some text with salt i

Best way to cross matching large datasets
Hi,

Im running a script where am I cross matching about 200 000 data sets with each other. Ea

Send current URL in URL with a $_GET variable problem.
Hello community,

I have created a function that gets the current variable of a page, example:

Inserting a check in checkbox from array value
Hello all,
I have a bit of code that works for a select option box, but does not work for my chec

PHP File Upload Problem
Hi, I have written a very simple file upload script but it fails for reasons I can't explain. Hope

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash