Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. COOk that was I was asking say if I saved time for everything using utc, now you are saying that I should give an option to users to select their time zone and accordingly +/- after retrieving the data from sql right? and will this task also accomplish if I want to show users posted 8 mins ago 9 ins a go and aftr few hours I'll be showing real time? moreover what if a user sends message to another user with different timezone? will php balance the timezone set for both users?
      singulars
    2. COIf two users message each other, the fact that they're in different timezones doesn't matter. Any stored dates are stored in UTC, so it's a matter of simply setting date_default_timezone_set for each user to their own timezone, and using DateTime objects. Eg: `$date = new DateTime($theDateInUTC); $date->format('d/m/y h:i:s');`. Then whoever is looking at that date will see it relative to themselves.
      singulars
    3. COthanks bro, ins hort, I use `gmdate()` and add or subtract offset using conditions according to the timezone user has set for him..and btw am using procedural...and I am all clear now, I'll be storing dates and time using `gmdate` in my database, and later set default time zone as per his/her setting or show default timezone to him :) and btw any idea to suggest him/her to set timezone, kinda using his ip to know from where he is login in..?or I should let him select tihe timezone himself?
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload