Jump to content

Recommended Posts

if I have a number like -5 which represents the offset from UTC, how do I format a time that I already have in this format? 2010-04-30 11:38:56"

 

btw, 2010-04-30 11:38:56 is already in UTC

 

I'd preferably like to break it up into two parts afterwards. One that says "April 10th, 2010" and another that says "6:38 PM"  (with no leading zero's)

Link to comment
https://forums.phpfreaks.com/topic/202300-require-help-formatting-the-time/
Share on other sites

You're right JAY6390, I mistake. I have a delusion that adding hours, days etc. with just incrementing by NNN seconds might be incorrect, while function mktime() respect things like daylight saving time and leap years. Anyway I always use mktime rather than multiplying seconds.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.