MYSQL incorrect DATETIME format

前端 未结 4 1831
醉酒成梦
醉酒成梦 2020-12-09 16:15

I have an app with Doctrine 1 and I generate update_datetime fields for objects via new Zend_Date->getIso(). It worked just fine for years, but

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-09 17:10

    Date constants in zend are determined from sniffing out locale in this order (form zend_locale comments)

    1. Given Locale
    2. HTTP Client
    3. Server Environment
    4. Framework Standard
    

    I'm thinking the difference between the two systems is going to be reflected in the Server Environment.

    To correct and avoid this problem in the future you can specify the locale options within your application.ini using these configuration directive.

    resources.locale.default = 
    resources.locale.force = false
    resources.locale.registry_key = "Zend_Locale"
    

    The locale should be set to a string like en_US

    Zend_Locale specificly sniffs the locale from the environment from a call to setlocale and parsing the results.

提交回复
热议问题