forked from facebookincubator/velox
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c21d511
commit 1f18e8f
Showing
5 changed files
with
244 additions
and
33 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
velox/external/date/patches/0006-add_get_time_zone_names.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
diff --git a/velox/external/date/tz.cpp b/velox/external/date/tz.cpp | ||
--- a/velox/external/date/tz.cpp | ||
+++ b/velox/external/date/tz.cpp | ||
@@ -3538,6 +3538,14 @@ | ||
return get_tzdb_list().front(); | ||
} | ||
|
||
+std::vector<std::string> get_time_zone_names() { | ||
+ std::vector<std::string> result; | ||
+ for (const auto& z : get_tzdb().zones) { | ||
+ result.push_back(z.name()); | ||
+ } | ||
+ return result; | ||
+} | ||
+ | ||
const time_zone* | ||
#if HAS_STRING_VIEW | ||
tzdb::locate_zone(std::string_view tz_name) const | ||
diff --git a/velox/external/date/tz.h b/velox/external/date/tz.h | ||
--- a/velox/external/date/tz.h | ||
+++ b/velox/external/date/tz.h | ||
@@ -1258,6 +1258,8 @@ | ||
|
||
DATE_API const tzdb& get_tzdb(); | ||
|
||
+std::vector<std::string> get_time_zone_names(); | ||
+ | ||
class tzdb_list | ||
{ | ||
std::atomic<tzdb*> head_{nullptr}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.