gosnowflake
gosnowflake copied to clipboard
SNOW-545648: Unintuitive timezone behavior, lack of documentation
If you create a time.Now()
using DataTypeTimestampLtz
, this driver doesn't appear to work correctly.
I don't really know what it was doing under the hood, but it was definitely detecting the wrong timezone.
As far as I'm concerned it doesn't work; I set the logger to debug and it didn't look like it was formatting the value correctly (or at all).
I'm not using this behavior because it appears to not work, and it does unintuitive things like automatic timezone detection. I don't know why I would need that behavior, but regardless it doesn't appear to work.
I'm not going to follow up on this issue. Feel free to ack and close.
@kevin-lindsay-1 Thank you for bringing this to our attention. Would you mind sharing how you're using DataTypeTimestampLtz? Whether it be a bug or lack of documentation, we'd like to fix this problem. Thanks.
Exactly as it says in the documentation. Hard to pinpoint the issue, because as I said, I enabled the logger in debug mode to see what the issue was, and it looked like it was maybe not being formatted. I'm not sure, because I'm not sure I was looking at the render string or the pre-rendered string.
If it's a lack of formatting, then that sounds like a bug. If it's getting the timezone set wrong, then that's even more strange, because it's pretty easy to just use UTC in golang, no idea why anyone would want to do timezone detection when you can just use UTC because that's why UTC exists.
I see. Timestamp_LTZ is meant to capture the current session's timezone, noted in the TIMEZONE session parameter. We will look into what went wrong here.
Yeah I was more referring to "I don't understand why you're capturing a timezone when UTC exists and you can just convert the value to UTC".
linked issue #555 was resolved by PR #571 so closing this as resolved too. if you found the issue is unrelated to what was resolved in the referenced PR and/or it is still an issue for you, please reopen it with the details or comment and I'll reopen it for you. thank you !