You are reading a single comment by @Velocio and its replies. Click here to read the full conversation.
  • Argh! Doing my head in.

    1. Do you accept that if you save 10am BST in UTC you get 9am?
    2. Do you accept that if you render UTC 9am and your system clock is presently BST you get 10am?
    3. Do you accept that if you render UTC 9am and your system clock is presently GMT you get 9am?

    There are no other assumptions in the questions, no hidden information, nothing more to know... just those things. No ifs, no buts. Don't assume anything else, each question is the totality of information you have, and there is nothing more than what is stated in each question.

    #1 Happens when they create an event.
    #2 Happens when they view the event immediately after creating it.
    #3 Happens when they view the same event in 3 weeks time, after DST has changed.

  • Yes, yes and yes.
    But, ONLY if I instantiate Date object with Today, then ONLY setting the time before converting from UTC to local.

    If you're truly only passing the time to your Date object then you're doing it wrong and of course your code will fail. If you instigate that date object with the event date and time then your system clock is NOT relevant. It is the event date that decides whether it converts to BST or GMT

About

Avatar for Velocio @Velocio started