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
do1 = DateObject[3155673600]
do1 /. (TimeZone -> _) :> (TimeZone -> 12)
Observe that GMT-8 has become GMT+12. I believe this is what you want?
A different effect:
DateObject[do1, TimeZone -> 12]
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$ 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$ Feb 4, 2016 at 17:18