问题
I've been looking through the docs and playing around on my own with material ui and I do not see any sort of setting to be able to choose the time in UTC. It always defaults to my local timezone for the time picker, even if I pass in a UTC Date object. Is anyone aware of a workaround for this?
回答1:
Only way is to format your Date into String then use moment-timezone
var newYork = moment.tz("2014-06-01 12:00", "America/New_York");
var losAngeles = newYork.clone().tz("America/Los_Angeles");
var london = newYork.clone().tz("Europe/London");
I hope it will be support in material-ui
来源:https://stackoverflow.com/questions/37789619/material-ui-time-picker-utc