+ int32_t len = 0;
+ bundle = ures_openDirect(NULL, "zoneinfo64", &status);
+ versionStr = ures_getStringByKey(bundle, "TZVersion", &len, &status);
+ if (U_SUCCESS(status)) {
+ vtz->icutzver.setTo(versionStr, len);
+ }
+ ures_close(bundle);
+ return vtz;
+}
+
+VTimeZone*
+VTimeZone::createVTimeZoneFromBasicTimeZone(const BasicTimeZone& basic_time_zone, UErrorCode &status) {
+ if (U_FAILURE(status)) {
+ return NULL;
+ }
+ VTimeZone *vtz = new VTimeZone();
+ if (vtz == NULL) {
+ status = U_MEMORY_ALLOCATION_ERROR;
+ return NULL;
+ }
+ vtz->tz = (BasicTimeZone *)basic_time_zone.clone();
+ if (vtz->tz == NULL) {
+ status = U_MEMORY_ALLOCATION_ERROR;
+ delete vtz;
+ return NULL;
+ }
+ vtz->tz->getID(vtz->olsonzid);
+
+ // Set ICU tzdata version
+ UResourceBundle *bundle = NULL;
+ const UChar* versionStr = NULL;
+ int32_t len = 0;
+ bundle = ures_openDirect(NULL, "zoneinfo64", &status);