param icon indicating copy to clipboard operation
param copied to clipboard

Serialize CalendarDate and Date Parameters with their timezone info?

Open maximlt opened this issue 3 years ago • 2 comments

CalendarDate serializes with value.strftime("%Y-%m-%d") and Date with value.strftime("%Y-%m-%dT%H:%M:%S.%f"). These two formats don't include any timezone info while they include the time offset, e.g. as in 2022-05-11T17:33:14+02:00. I would think this would be an improvement to Param, however I'm not sure about the consequences on GUI libraries using Param like Panel, which would then have to deal with timezone infos to set the values of their date-related widgets.

maximlt avatar May 11 '22 17:05 maximlt

Are you saying that round-tripping is currently lossy, stripping the timezone, and that you are proposing that it not be? If so I think that sounds like something we need to fix, and that Panel would need to deal with the time zone however Panel likes.

jbednar avatar May 11 '22 21:05 jbednar

Are you saying that round-tripping is currently lossy

Exactly.

image

maximlt avatar May 12 '22 23:05 maximlt