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
Did you know?Explore Trending and Topic pages for more stories like this.
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?
No comments posted yet

Your Answer:

Login to answer
100 Like 40 Dislike
Previous forums Next forums
Other forums

IF Statement & Two Tables With Different Echoes
I'm retrieving two tables in a single query using UNION ALL, like so:

Code: $query = "SE

Need help PLEASE
ok i have this warning showing up

Warning: in_array() [function.in-array]: Wrong datatype for

PHP and MySQL Question/Help
I have a MySQL db with all my servers and all their details like server name, IP, OS, RAM etc etc 26

Product categories for registration
Dear all,

We are going live with the Supplier registered next week. At standard, the 'sel

Word Trimming
Hi Guys & Gals!!

Hope you are all ok....

I need some help with the following

md5 is it unique
I know this is most likely one of many simple questions that can be found semi easily. But I'm press

How could I combine these arrays??
Hello.. I'm trying to figure out a way to combine these first two arrays to get the last array..

How do I replace any number of character occurences with one occurrence?
How do I replace any number of character occurences with one occurrence?

Let's say I have:

explode() function problem maybe
Hi I'm having trouble searching my database. When I type two words in the search field it only searc

Career Change into SAP
Hai
I am sajesh ,did my diploma in Mechatronics i have a 4 years of experience in

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