Problem 45848. What is the current time in Darwin, Australia?
Traders need to track exchange calendars and trading hours in detail, and account for time zone differences and daylight savings offsets. These can be tricky in cities with half-hour and quarter-hour offset to UTC. https://en.wikipedia.org/wiki/List_of_stock_exchange_trading_hours
MATLAB comes to rescue! https://www.mathworks.com/help/matlab/ref/datetime.html
You are given an array with UTC date and time as [year, month, day, hour, minute] and a char array with the name of the time zone. Return a char array with the current date and time in the specified time zone, in the format 'MMM-dd-yyyy HH:mm'.
For example, for inputs [2020 6 9 21 50 0] and 'Australia/Dawin', you should get 'Jun-10-2020 07:20' in return.
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers11
Suggested Problems
-
How to find the position of an element in a vector without using the find function
2706 Solvers
-
Find out missing number from a vector of 9 elements
293 Solvers
-
What is Sum Of all elements of Matrix
407 Solvers
-
Find out value of sine given by degree.
326 Solvers
-
1597 Solvers
More from this Author10
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!