diff options
author | moroznastya <moroznastya@yandex-team.com> | 2023-12-05 21:56:41 +0300 |
---|---|---|
committer | moroznastya <moroznastya@yandex-team.com> | 2023-12-05 22:39:17 +0300 |
commit | faf9f5de6a6799aa2e80c7e8077ceca4670daa4f (patch) | |
tree | a11ceb11c82442398934e3771b488361e0729412 /library/cpp/timezone_conversion/civil.cpp | |
parent | ca072a4c932bc2df166fb17f03eb2481c43f948d (diff) | |
download | ydb-faf9f5de6a6799aa2e80c7e8077ceca4670daa4f.tar.gz |
parsing promos
Diffstat (limited to 'library/cpp/timezone_conversion/civil.cpp')
-rw-r--r-- | library/cpp/timezone_conversion/civil.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/library/cpp/timezone_conversion/civil.cpp b/library/cpp/timezone_conversion/civil.cpp index 5986318b9a..0a9b6acaa6 100644 --- a/library/cpp/timezone_conversion/civil.cpp +++ b/library/cpp/timezone_conversion/civil.cpp @@ -25,6 +25,12 @@ namespace { if (!name.SkipPrefix(OFFSET_PREFIX)) { return false; } + return NDatetime::TryParseOffset(name, offset); + } +} // anonymous namespace + +namespace NDatetime { + bool TryParseOffset(TStringBuf name, int& offset) { if (name.empty()) { return false; } @@ -61,9 +67,7 @@ namespace { offset = -offset; return true; } -} // anonymous namespace -namespace NDatetime { TTimeZone GetTimeZone(TStringBuf name) { int offset; if (TryParseUTCOffsetTimezone(name, offset)) { |