| От | Peter Eisentraut |
|---|---|
| Тема | Re: about EncodeDateTime() arguments |
| Дата | |
| Msg-id | 1331667716.11136.10.camel@vanquo.pezone.net обсуждение |
| Ответ на | Re: about EncodeDateTime() arguments (Tom Lane <tgl@sss.pgh.pa.us>) |
| Ответы |
Re: about EncodeDateTime() arguments
|
| Список | pgsql-hackers |
On lör, 2012-03-10 at 18:47 -0500, Tom Lane wrote: > > void EncodeDateTime(struct pg_tm * tm, fsec_t fsec, const int *tzp, const char *tzn, int style, char *str) > > It appears to me that null-ness of tzp and tzn are used as a 3-way flag > to identify the style of timezone output wanted (none, numeric, or alpha). > It would probably be better yet if it went like > > enum tzstyle, int tzp, const char *tzn > > where tzp or tzn would be examined only if tzstyle said so. It's not quite a three-way flag, because it also depends on the style, which time zone style is used. But I liked the idea of making "print the time zone" more explicit and getting rid of the funny pointers. I added a bit of documentation and code deduplication in the attached patch, and it already looks much more understandable.
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера