qdate icon indicating copy to clipboard operation
qdate copied to clipboard

Add atom `retain` as a possible value for ToTimezone

Open lukyanov opened this issue 8 years ago • 7 comments

This will keep the original timezone from the input date.

lukyanov avatar Dec 22 '16 15:12 lukyanov

Yuri, you are the hero our world needs!

With the holidays in full swing, I probably won't have a chance to look this over until after the weekend, but on a quick glance, this looks good.

Thanks so much!

choptastic avatar Dec 23 '16 02:12 choptastic

Well, I found a bug here... to_string("T", retain, "2016:12:26 01:00+03:00")) won't work (fails with an exception). I'm not quite sure how to deal with this... The problem here is that we cannot "retain" the timezone "+03:00" as for this we would need a literal name of the timezone ("MSK"), but there is no way to convert it... It's not even valid to do such a conversion...

What are your thoughts on this?

lukyanov avatar Dec 26 '16 10:12 lukyanov

Sorry for the delay. Good catch on the bug. I'd think it'd probably be worth converting hard-offset timezones (like +0500 or GMT-10) to the offset name like "GMT+5" or "GMT-10".

Seems like the safest solution. Whaddya think?

choptastic avatar Dec 29 '16 01:12 choptastic

Does my suggestion seem reasonable to you, and if so, would you have time to try to implement it?

choptastic avatar Jan 04 '17 21:01 choptastic

Yes, it seems reasonable. I'll try. Sorry for the delay, long holidays in Russia :)

lukyanov avatar Jan 07 '17 17:01 lukyanov

That's quite alright! No rush. Take the time with your family!

On Jan 7, 2017 11:07 AM, "Yuri Lukyanov" [email protected] wrote:

Yes, it seems reasonable. I'll try. Sorry for the delay, long holidays in Russia :)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/choptastic/qdate/pull/28#issuecomment-271095965, or mute the thread https://github.com/notifications/unsubscribe-auth/AALYnNPcVdy3DNPIHfZTonkveO7iBH94ks5rP8ZpgaJpZM4LUD7G .

choptastic avatar Jan 07 '17 17:01 choptastic

Hi @lukyanov!

Just bouncing in here to see if this is something you still had plans on implementing. I know it has been a few years, so if that's not in the plan anymore, I can finish it off.

choptastic avatar Aug 13 '23 00:08 choptastic