diff options
author | S.H <[email protected]> | 2020-07-23 11:35:20 +0900 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-23 11:35:20 +0900 |
commit | afacf85e443cc64dd41c248659b65476434b4175 (patch) | |
tree | 9daf738ec11e2d3e1735380f749ae8b72810af2a | |
parent | 8ed687a4d7b7a77f30f8e937f58aae74bfb699b6 (diff) |
Merge pull request #3352 from S-H-GAMELINKS/bug/17042-strftime
Fix Time#strftime with timezone [Bug #17042]
Notes
Notes:
Merged-By: nobu <[email protected]>
-rw-r--r-- | time.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -5109,6 +5109,10 @@ time_strftime(VALUE time, VALUE format) VALUE tmp; GetTimeval(time, tobj); + if (tobj->vtm.yday == 0) { + VALUE zone = tobj->vtm.zone; + if (!NIL_P(zone)) zone_localtime(zone, time); + } MAKE_TM(time, tobj); StringValue(format); if (!rb_enc_str_asciicompat_p(format)) { |