在DART中获取特定时区的小时
我必须在一个飞行中的飞行时间(HH:mm)中展示,该国当地时代的飞机正在起飞或着陆。并且不是根据移动设备的时区,
因此,如何获得时区的特定时间格式(HH:mm),知道我得到了2种不同的TZ格式(根据源)。 欧洲/伦敦
,或者可以是+04:00
我可能看到了2个库timezone
或time_machine
time_machine 但是不知道它是否很好,
非常感谢
I have to display in a Flutter app, the time (HH:MM) of a flight in the local time of the country where the flight is taking off or landing. And NOT according to the timezone of the mobile device
So, how can I get the specific time format (HH:MM) of a Timezone, knowing that I got 2 different TZ format (according to source). Either such as Europe/London
or could be +04:00
I have seen possibly 2 libraries timezone
or time_machine
but don't know if it is good fit
Many thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不幸的是,
datetime
DART类仅支持UTC和本地时区。我建议使用以下第三方软件包:https://pub.dev/packages/packages/timezone 时区:
Unfortunately, the
DateTime
class of Dart only supports UTC and the local timezone. I suggest using the following third party package:https://pub.dev/packages/timezone
It supports time zones: