[Closed] the date from other timezone
how to get the current date from other timezone, let’s say from London in maxscript?
timezone_ = dotnetclass "System.TimeZoneInfo"
showproperties timezone_
showmethods timezone_
tzLondon = timezone_.FindSystemTimeZoneById("Europe/London")
Sorry, but I don’t understand, how to get the date from London, let’s say!
tz = dotnetclass "System.TimeZoneInfo"
showproperties timezone_
showmethods timezone_
tzLondon = tz.FindSystemTimeZoneById("GMT Standard Time")
showmethods tzLondon
tzLondon.ToSerializedString()
refer to this post :
Thanks, k4noe, but to be sincere I’m dissapointed, I get
"GMT Standard Time;0;(UTC) Dublin, Edinburgh, Lisbon, London;GMT Standard Time;GMT Daylight Time;[01:01:0001;12:31:9999;60;[0;01:00:00;3;5;0;];[0;02:00:00;10;5;0;];];"
where is the date?
fn getDateFromOtherTimeZone loc = --string
(
aa= dotnetclass "System.TimeZoneInfo"
bb= dotnetclass "DateTime"
cc= bb.UtcNow
dd= aa.ConvertTimeBySystemTimeZoneId cc loc-- change it from list
dd.ToShortDateString()
)
getDateFromOtherTimeZone “UTC+12”
list country
[ul]
[li]Dateline Standard Time[/li]> [li]UTC-11[/li]> [li]Samoa Standard Time[/li]> [li]Hawaiian Standard Time[/li]> [li]Alaskan Standard Time[/li]> [li]Pacific Standard Time (Mexico)[/li]> [li]Pacific Standard Time[/li]> [li]US Mountain Standard Time[/li]> [li]Mountain Standard Time (Mexico)[/li]> [li]Mountain Standard Time[/li]> [li]Central America Standard Time[/li]> [li]Central Standard Time[/li]> [li]Central Standard Time (Mexico)[/li]> [li]Canada Central Standard Time[/li]> [li]SA Pacific Standard Time[/li]> [li]Eastern Standard Time[/li]> [li]US Eastern Standard Time[/li]> [li]Venezuela Standard Time[/li]> [li]Paraguay Standard Time[/li]> [li]Atlantic Standard Time[/li]> [li]Central Brazilian Standard Time[/li]> [li]SA Western Standard Time[/li]> [li]Pacific SA Standard Time[/li]> [li]Newfoundland Standard Time[/li]> [li]E. South America Standard Time[/li]> [li]Argentina Standard Time[/li]> [li]SA Eastern Standard Time[/li]> [li]Greenland Standard Time[/li]> [li]Montevideo Standard Time[/li]> [li]UTC-02[/li]> [li]Mid-Atlantic Standard Time[/li]> [li]Azores Standard Time[/li]> [li]Cape Verde Standard Time[/li]> [li]Morocco Standard Time[/li]> [li]UTC[/li]> [li]GMT Standard Time[/li]> [li]Greenwich Standard Time[/li]> [li]W. Europe Standard Time[/li]> [li]Central Europe Standard Time[/li]> [li]Romance Standard Time[/li]> [li]Central European Standard Time[/li]> [li]W. Central Africa Standard Time[/li]> [li]Namibia Standard Time[/li]> [li]Jordan Standard Time[/li]> [li]GTB Standard Time[/li]> [li]Middle East Standard Time[/li]> [li]Egypt Standard Time[/li]> [li]Syria Standard Time[/li]> [li]South Africa Standard Time[/li]> [li]FLE Standard Time[/li]> [li]Israel Standard Time[/li]> [li]E. Europe Standard Time[/li]> [li]Arabic Standard Time[/li]> [li]Arab Standard Time[/li]> [li]Russian Standard Time[/li]> [li]E. Africa Standard Time[/li]> [li]Iran Standard Time[/li]> [li]Arabian Standard Time[/li]> [li]Azerbaijan Standard Time[/li]> [li]Mauritius Standard Time[/li]> [li]Georgian Standard Time[/li]> [li]Caucasus Standard Time[/li]> [li]Afghanistan Standard Time[/li]> [li]Ekaterinburg Standard Time[/li]> [li]Pakistan Standard Time[/li]> [li]West Asia Standard Time[/li]> [li]India Standard Time[/li]> [li]Sri Lanka Standard Time[/li]> [li]Nepal Standard Time[/li]> [li]Central Asia Standard Time[/li]> [li]Bangladesh Standard Time[/li]> [li]N. Central Asia Standard Time[/li]> [li]Myanmar Standard Time[/li]> [li]SE Asia Standard Time[/li]> [li]North Asia Standard Time[/li]> [li]China Standard Time[/li]> [li]North Asia East Standard Time[/li]> [li]Singapore Standard Time[/li]> [li]W. Australia Standard Time[/li]> [li]Taipei Standard Time[/li]> [li]Ulaanbaatar Standard Time[/li]> [li]Tokyo Standard Time[/li]> [li]Korea Standard Time[/li]> [li]Yakutsk Standard Time[/li]> [li]Cen. Australia Standard Time[/li]> [li]AUS Central Standard Time[/li]> [li]E. Australia Standard Time[/li]> [li]AUS Eastern Standard Time[/li]> [li]West Pacific Standard Time[/li]> [li]Tasmania Standard Time[/li]> [li]Vladivostok Standard Time[/li]> [li]Central Pacific Standard Time[/li]> [li]New Zealand Standard Time[/li]> [li]UTC+12[/li]> [li]Fiji Standard Time[/li]> [li]Kamchatka Standard Time[/li]> [li]Tonga Standard Time[/li]> [/ul]