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

help removing unwanted graphic
How do I remove the small elongated rectangular shape between the "Latest post" and "

Secure FTP
Hi experts,
There is no SFTP action in MII workbench.
This means it needs developing custo

array empty
Hiya peeps,

Ok here is the codes.

order.php

Code:

Need help making a blockquote and line items conditional
I have some code I bought a few years ago that allows my clients to update content on their site usi

php code to accept and delete incoming data
Using following HTML Code please show me how to write PHP code to accept and delete the incoming dat

Automatic Webpage ??
I have a page www.mysite.com/test.php with a
<form>
<textarea name=&q

Check Date/Time in PHP
What I need the code to check is that $reQuest is 24 hours in the past then return a time based on h

Loop Through Date Range
Hi guys,
I have date range as parameter like 01/JAN/2009 TO 16/JAN/2009 now i want to loop thro

Sorting JTable on more than just the values listed in the columns
I have a collection of objects that store (among other things) two integer values. I only want to di

I have a parse error in this query help..
Code: $query1="INSERT INTO `rating` (`item_name`, `rating`, `ip_address`, `date_rated`) VALUES

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