Я хотел бы определить временное смещение к GMT/UTC (включая летнее время) для разных стран в определенную дату в VBA. Есть идеи?
РЕДАКТИРОВАТЬ (от самоответчика):
Спасибо 0xA3. Я быстро прочитал связанную страницу. Я предполагаю, что вы можете получить смещение только к GMT для локального, где работают окна:
ConvertLocalToGMT
DaylightTime
GetLocalTimeFromGMT
LocalOffsetFromGMT
SystemTimeToVBTime
LocalOffsetFromGMT
В Java вы можете сделать следующее:
TimeZone bucharestTimeZone = TimeZone.getTimeZone("Europe/Bucharest");
bucharestTimeZone.getOffset(new Date().getTime());
Calendar nowInBucharest = Calendar.getInstance(TimeZone.getTimeZone("Europe/Bucharest"));
nowInBucharest.setTime(new Date());
System.out.println("Bucharest: " + nowInBucharest.get(Calendar.HOUR) + ":" + nowInBucharest.get(Calendar.MINUTE));
Это означает, что я могу получить смещение для разных стран (часовые пояса), и, таким образом, я также могу получить фактическое время, скажем, в bucharest. Могу ли я сделать это в VBA?