Date formatting with Timezone
"Marco Baurdoux" <[email protected]> Wed, 2 Nov 2016 16:43:22 +0100
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Organization | Tourisoft |
| Message-ID | <[email protected]> |
Hello, We're running Freetds 1.00.15 on a CentOS Linux release 7.2.1511 and connecting to MS-SQL 2014 We're trying to obtain the date in the following format "2016-11-02 13 :28 :32.0000000 +02:00". For this we've configured the date format parameter in the locales.conf file to %Y-%m-%d %H:%M:%S.%z %Z Depending on which tdsver we configure, even the output of "%Y-%m-%d %H:%M:%S.%z %Z" is different: - With TDSVER 7.1 or 7.2 we obtain a date formatted like "2016-11-02 13:28:32.0000000 +00:00". Exactly what we want. - With TDSVER 7.3 or 7.4 we obtain a date formatted like "2016-11-02 13:28:32.0000000 CET. This breaks our PHP API but it respects the strftime description of %Z. I'm unable to find how to obtain the time zone in "+00:00" format. Is there a solution to work with the latest version of Freetds and still get the timezone is the wished format or are we doomed (:)) to stick to version 7.2? Thank you for any feedback/advice. Regards, Marco Baurdoux Business Development / Co-Founder Tourisoft / Hotel-Spider Route de Champ-Colin 18 CH-1260 Nyon Switzerland Tel: +41 22 360 03 70 Fax: +41 22 360 03 73 http://www.hotel-spider.com