作者:亲爱的jackvan叔叔 | 来源:互联网 | 2023-08-17 12:15
I have a few places in the code where I need to use the TimeZone. I can get the timezone name using DateTime::TimeZone. Is it reasonable to put the timezone name in a constant? Or should it be in a variable?
我在代码中有几个地方需要使用TimeZone。我可以使用DateTime :: TimeZone获取时区名称。将时区名称放在常量中是否合理?或者它应该在变量中?
3 个解决方案