How can one modify the wrong time zone in a DateObject, without a conversion? Can one manipulate the TimeZone directly without having the numerical value of the time changing?


1 Answer 1

do1 = DateObject[3155673600]

enter image description here

do1 /. (TimeZone -> _) :> (TimeZone -> 12)

enter image description here

Observe that GMT-8 has become GMT+12. I believe this is what you want?

A different effect:

DateObject[do1, TimeZone -> 12]

enter image description here

00:00:00 has become 20:00:00 here.

  • $\begingroup$ This is exactly what I was looking for! Your first suggestion does the job - excellent! $\endgroup$
    – hippo3773
    Commented Feb 4, 2016 at 16:50
  • $\begingroup$ @hippo3773 I am glad I could help. Since you say this is exactly what you were looking for please consider Accepting this answer. $\endgroup$
    – Mr.Wizard
    Commented Feb 4, 2016 at 17:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.