• <bdo id='v7XF3'></bdo><ul id='v7XF3'></ul>

      <small id='v7XF3'></small><noframes id='v7XF3'>

    1. <tfoot id='v7XF3'></tfoot>
      <legend id='v7XF3'><style id='v7XF3'><dir id='v7XF3'><q id='v7XF3'></q></dir></style></legend>
    2. <i id='v7XF3'><tr id='v7XF3'><dt id='v7XF3'><q id='v7XF3'><span id='v7XF3'><b id='v7XF3'><form id='v7XF3'><ins id='v7XF3'></ins><ul id='v7XF3'></ul><sub id='v7XF3'></sub></form><legend id='v7XF3'></legend><bdo id='v7XF3'><pre id='v7XF3'><center id='v7XF3'></center></pre></bdo></b><th id='v7XF3'></th></span></q></dt></tr></i><div id='v7XF3'><tfoot id='v7XF3'></tfoot><dl id='v7XF3'><fieldset id='v7XF3'></fieldset></dl></div>

      获取 PHP 中的美国官方时区?

      时间:2024-08-14
            <tfoot id='MLl2N'></tfoot>

            <small id='MLl2N'></small><noframes id='MLl2N'>

            <i id='MLl2N'><tr id='MLl2N'><dt id='MLl2N'><q id='MLl2N'><span id='MLl2N'><b id='MLl2N'><form id='MLl2N'><ins id='MLl2N'></ins><ul id='MLl2N'></ul><sub id='MLl2N'></sub></form><legend id='MLl2N'></legend><bdo id='MLl2N'><pre id='MLl2N'><center id='MLl2N'></center></pre></bdo></b><th id='MLl2N'></th></span></q></dt></tr></i><div id='MLl2N'><tfoot id='MLl2N'></tfoot><dl id='MLl2N'><fieldset id='MLl2N'></fieldset></dl></div>
            • <bdo id='MLl2N'></bdo><ul id='MLl2N'></ul>
                <tbody id='MLl2N'></tbody>
            • <legend id='MLl2N'><style id='MLl2N'><dir id='MLl2N'><q id='MLl2N'></q></dir></style></legend>

                本文介绍了获取 PHP 中的美国官方时区?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我的数据库中存储了帐户,并且每个帐户状态都存档,从那里我想根据帐户状态将每个帐户链接到一个时区.

                I have account stored in my database and I have each account state on file, from there I want to link each account to a timezone based on the account state.

                因此,如果帐户所在的州是加利福尼亚州,则时区将为America/Los_Angeles"

                so if the account's state is California then the timezone will be "America/Los_Angeles"

                更多,我想分解此页面提供的时区 http://php.net/manual/en/timezones.america.php by大西洋东中央山太平洋阿拉斯加州夏威夷 - 阿留申

                More, I want to break down the time zone that is provided at this page http://php.net/manual/en/timezones.america.php by Atlantic Eastern Central Mountain Pacific Alaska Hawaii - Aleutian

                现在我将能够根据 7 个时区对我的数据进行排序,并且我可以将我的所有帐户链接到一个时区,以便我可以确定它们的时区.

                Now I will be able to sort my data based on 7 time zones and also I can have all my account linked to a timezone so I can determine their time zone.

                所以我的问题1)我怎样才能弄清楚什么状态与什么时区相关联.(例如:加利福尼亚 = "America/Los_Angeles")

                So My question 1) How can I figure out what state is linked to what timezone. (example: California = "America/Los_Angeles")

                2) 哪个时区与哪个时区类别相关联.(例如:加利福尼亚 = 太平洋)

                2) Which timezone are linked to what timezone category. (example: California = Pacific)

                推荐答案

                你还没想好.

                美国的许多州都有多个时区.例如,南达科他州同时拥有山区和中部时区.

                Many US states have multiple time zones. For example, South Dakota has both Mountain and Central time zones.

                如果您希望将位置解析为时区,则需要更精细的位置.理想情况下,一个纬度和经度.如果您没有,您可以估算邮政编码的质心纬度/经度,然后将其用于将其解析为时区的许多各种服务或数据库中的任何一种.但是要非常小心,并不是所有的邮政编码都代表物理位置,而且邮政编码经常变化.

                If you desire to resolve a location to a time zone, you will need a much more granular location. Ideally, a latitude and longitude. If you don't have one, you can approximate the centroid lat/lon of a zip code, and then use that against any of many various services or databases that will resolve that to a time zone. But be very careful, not all zip codes represent physical locations, and zip codes change frequently.

                这篇关于获取 PHP 中的美国官方时区?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:为什么 php datetime diff 依赖于时区? 下一篇:在 PHP 中将时区设置为 UTC (0)

                相关文章

                  <small id='x5NDG'></small><noframes id='x5NDG'>

                1. <tfoot id='x5NDG'></tfoot>

                    <bdo id='x5NDG'></bdo><ul id='x5NDG'></ul>
                    <legend id='x5NDG'><style id='x5NDG'><dir id='x5NDG'><q id='x5NDG'></q></dir></style></legend>
                    <i id='x5NDG'><tr id='x5NDG'><dt id='x5NDG'><q id='x5NDG'><span id='x5NDG'><b id='x5NDG'><form id='x5NDG'><ins id='x5NDG'></ins><ul id='x5NDG'></ul><sub id='x5NDG'></sub></form><legend id='x5NDG'></legend><bdo id='x5NDG'><pre id='x5NDG'><center id='x5NDG'></center></pre></bdo></b><th id='x5NDG'></th></span></q></dt></tr></i><div id='x5NDG'><tfoot id='x5NDG'></tfoot><dl id='x5NDG'><fieldset id='x5NDG'></fieldset></dl></div>