Jump to content

Search the Community

Showing results for tags 'utc'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • The Web Designer Forum Community
    • Web Designer Forum News
    • Web Designer Forum Introductions
    • General Chat
    • Design Competitions
  • Web Design Resource
    • Website Design and Layout
    • Website Reviews and Feedback
    • Other Resources
    • Graphic Design Forum
  • Web Development
    • Frontend
    • Server Side
    • Content Management Systems (CMS)
  • SEO, Website Marketing and Business
    • Social Media
    • Freelancing, Business and Legal Discussion
    • SEO (Search Engine Optimisation) & Search Engines
    • Website Management
  • Software & Hardware
    • Web Browsers
    • Web Design Scripts & Software
    • Web Development Scripts & Software
    • Hardware
  • The Marketplace

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start




Website URL




Found 2 results

  1. BrowserBugs

    SQL vs PHP: DateTime Issue

    Hi Gang, Bit of a weird one, hoping someone can help. I've a 1 hour gap (UTC/BST) between SQL and PHP. $q = "UPDATE `table` SET `updated` = NOW() WHERE `id` = ?"; // SQL table updates correctly with BST e.g. 2017/04/07 09:42:00, however the following at the same time... echo date("Y-m-d H:i:s"); // This shows 2017/04/07 08:42:00 which is UTC. Might be a bit green here, I always thought SQL time and php time would be the same as it would use system clock or am I missing something? Cheers. Edit: So I made a function for displaying current London time. function londonTime() { $a = new DateTime("now", new DateTimeZone("Europe/London")); $a->setTimestamp(time()); return $a->format("Y-m-d H:i:s"); } This works, but still not 100% sure why SQL takes BST into account so any explanation would be great, things like this niggle me
  2. Hi Gang, I'm working on a pet project and yet again I find myself at the mercy of time, more importantly the most logical way to present a drop down list and store the users time zone. I did some digging here, and figured this was a good approach, but I now find myself with an extensive list of 423 options. What i have decided so far is stacking by Region then City, so ... <option value="Europe/Jersey">Europe, Jersey (GMT +01:00)</option> <option value="Europe/Kaliningrad">Europe, Kaliningrad (GMT +02:00)</option> <option value="Europe/Kiev">Europe, Kiev (GMT +03:00)</option> <option value="Europe/Kirov">Europe, Kirov (GMT +03:00)</option> <option value="Europe/Lisbon">Europe, Lisbon (GMT +01:00)</option> <option value="Europe/Ljubljana">Europe, Ljubljana (GMT +02:00)</option> <option value="Europe/London" selected="selected">Europe, London (GMT +01:00)</option> <option value="Europe/Luxembourg">Europe, Luxembourg (GMT +02:00)</option> <option value="Europe/Madrid">Europe, Madrid (GMT +02:00)</option> <option value="Europe/Malta">Europe, Malta (GMT +02:00)</option> <option value="Europe/Mariehamn">Europe, Mariehamn (GMT +03:00)</option> <option value="Europe/Minsk">Europe, Minsk (GMT +03:00)</option> <option value="Europe/Monaco">Europe, Monaco (GMT +02:00)</option> <option value="Europe/Moscow">Europe, Moscow (GMT +03:00)</option> <option value="Europe/Oslo">Europe, Oslo (GMT +02:00)</option> ... but here's the snag, not sure if all are required, I know Jersey follows the same as London, Isle of Man is on the list too but with the region storage it'll be universal enough to use in conversion. Next thing is not sure if this is a logical order for people to use? It is for me, but some people for example would look for say "Mountain Time" which is a time zone but not everyone in the zone follow Daylight Saving. I know storing the zone using "Europe/Jersey" for example is the way to go as it's php friendly for converting from UTC (stored) to local time of user, bit baffled as to the best way to present it for selection. More of a think tank really, any ideas appreciated.