Support localized date strings
I don’t just want 9:41. I want 09:41 in some regions, and 上午9:41 in others.
SimulatorStatusMagic does this with a DateFormatter in Objective-C: https://github.com/shinydevelopment/SimulatorStatusMagic/blob/master/SDStatusBarManager/SDStatusBarManager.m#L220-L235
I’m not sure if there’s an easy way to do this from a shell script directly, but you could probably include a Swift script that you call that would do it for you.
I need to figure out more about how the status_bar command works. It will accept an ISO 8601 string, which will be helpful, but there's no indication as to whether the supplied string represents an "absolute" time or a real time accounting for time zone.
To rephrase: does "9:41" translate to 9:41 in your time zone, or 9:41 GMT?
All that said, I can surmise a bit about the internal behavior. My computer is using EST. The input "9:41" results in 9:41 being displayed in the simulator. If it isn't being localized for me, wouldn't that mean that the simulator would show a different time?
Try to break it. Try negative cases. Try setting your computer to a different time zone.