Python论坛  - 讨论区

标题:[python-chinese] logging模块处理时间为什么会差距个小时,有谁遇到过吗?

2008年01月07日 星期一 15:50

Arui Zen dujunfly在gmail.com
星期一 一月 7 15:50:24 HKT 2008

³ÌÐòÀïÃæÓÃÁËlogging,ĬÈϵÄasctimeÊä³öµÄʱ¼äÔçÁË8¸öСʱ,±ÈÈçÏÖÔÚÊÇ15:45,ËüÊä³öµÄÊÇ05:45,ÎҵĴúÂë:
ÎÒÒѾ­ÏÔʽָ¶¨ÁËdatefmtΪĬÈϸñʽ,

logger=logging.getLogger('IMR')
logger.setLevel(logging.DEBUG)
imrFormatter = logging.Formatter('%(asctime)s |##|
%(message)s',datefmt='%Y-%m-%d %H:%M:%S')


ƽ̨:
ubuntu server 7.10
ʱÇø: Asia/Shanghai

ÓÃpython²é¿´:
>>> import time
>>> time.asctime()
'Mon Jan  7 15:48:34 2008'
>>>

È»ºó³ÌÐòµÄÊä³ö»¹ÊÇÀàËÆÓÚ
2008-01-07 07:33:39 |##|
ÕâÑùµÄ¸ñʽ,ÕûÕûÔçÁË8Сʱ,

ÔÚÁíһ̨RHELÉÏÔËÐÐÒ²ÊÇÒ»ÑùµÄÇé¿ö,,,,
ÓÐË­Óöµ½¹ýÀàËÆÇé¿öÂð?ÇëÖ¸½Ì.

-- 

DJ
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20080107/64eba6df/attachment.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2008年01月07日 星期一 16:33

@@ askfor在gmail.com
星期一 一月 7 16:33:12 HKT 2008

ʱÇø ʱ²î£¿

On 1/7/08, Arui Zen <dujunfly在gmail.com> wrote:
>
> ³ÌÐòÀïÃæÓÃÁËlogging,ĬÈϵÄasctimeÊä³öµÄʱ¼äÔçÁË8¸öСʱ,±ÈÈçÏÖÔÚÊÇ15:45,ËüÊä³öµÄÊÇ05:45,ÎҵĴúÂë:
> ÎÒÒѾ­ÏÔʽָ¶¨ÁËdatefmtΪĬÈϸñʽ,
>
> logger=logging.getLogger('IMR')
> logger.setLevel(logging.DEBUG)
> imrFormatter = logging.Formatter('%(asctime)s |##|
> %(message)s',datefmt='%Y-%m-%d %H:%M:%S')
>
>
> ƽ̨:
> ubuntu server 7.10
> ʱÇø: Asia/Shanghai
>
> ÓÃpython²é¿´:
> >>> import time
> >>> time.asctime()
> 'Mon Jan  7 15:48:34 2008'
> >>>
>
> È»ºó³ÌÐòµÄÊä³ö»¹ÊÇÀàËÆÓÚ
> 2008-01-07 07:33:39 |##|
> ÕâÑùµÄ¸ñʽ,ÕûÕûÔçÁË8Сʱ,
>
> ÔÚÁíһ̨RHELÉÏÔËÐÐÒ²ÊÇÒ»ÑùµÄÇé¿ö,,,,
> ÓÐË­Óöµ½¹ýÀàËÆÇé¿öÂð?ÇëÖ¸½Ì.
>
> --
>
> DJ
> _______________________________________________
> python-chinese
> Post: send python-chinese在lists.python.cn
> Subscribe: send subscribe to python-chinese-request在lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20080107/7a990bac/attachment.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2008年01月07日 星期一 16:45

tairan wang python在tairan.net
星期一 一月 7 16:45:36 HKT 2008

1. 2̨»úÆ÷£¿
2. Èç¹ûÊÇ2̨»úÆ÷£¬Server µÄʱÇøÊÇʲô£¬ Client µÄʱÇøÓÖÊÇʲô£¿


Date: Mon, 7 Jan 2008 16:33:12 +0800
From: askfor在gmail.com
To: python-chinese在lists.python.cn
Subject: Re: [python-chinese]	loggingÄ£¿é´¦Àíʱ¼äΪʲô»á²î¾à¸öСʱ,ÓÐË­Óöµ½¹ýÂð?

ʱÇø ʱ²î£¿


On 1/7/08, Arui Zen <dujunfly在gmail.com> wrote:
³ÌÐòÀïÃæÓÃÁËlogging,ĬÈϵÄasctimeÊä³öµÄʱ¼äÔçÁË8¸öСʱ,±ÈÈçÏÖÔÚÊÇ15:45,ËüÊä³öµÄÊÇ05:45,ÎҵĴúÂë:
ÎÒÒѾ­ÏÔʽָ¶¨ÁËdatefmtΪĬÈϸñʽ,

logger=logging.getLogger
('IMR')
logger.setLevel(logging.DEBUG)
imrFormatter = logging.Formatter('%(asctime)s |##| %(message)s',datefmt='%Y-%m-%d %H:%M:%S') 

ƽ̨:
ubuntu server 7.10
ʱÇø: Asia/Shanghai


ÓÃpython²é¿´:
>>> import time
>>> time.asctime()
'Mon Jan  7 15:48:34 2008'
>>>   

È»ºó³ÌÐòµÄÊä³ö»¹ÊÇÀàËÆÓÚ 
2008-01-07 07:33:39 |##| 
ÕâÑùµÄ¸ñʽ,ÕûÕûÔçÁË8Сʱ,

ÔÚÁíһ̨RHELÉÏÔËÐÐÒ²ÊÇÒ»ÑùµÄÇé¿ö,,,,

ÓÐË­Óöµ½¹ýÀàËÆÇé¿öÂð?ÇëÖ¸½Ì.

-- 

DJ 
_______________________________________________
python-chinese
Post: send 
python-chinese在lists.python.cn
Subscribe: send subscribe to python-chinese-request在lists.python.cn

Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
Detail Info: 
http://python.cn/mailman/listinfo/python-chinese



_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20080107/451ee094/attachment.htm 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2008年01月07日 星期一 18:15

Arui Zen dujunfly在gmail.com
星期一 一月 7 18:15:57 HKT 2008

ÎÒÊÇ˵ÔÚÎҵĻúÆ÷ÉÏÓÐÕâ¸öÎÊÌâ,ÉÏ´«µ½¿ª·¢·þÎñÆ÷ÉÏÔËÐл¹ÊÇÕâ¸öÎÊÌâ.
ÓÃdateÃüÁî»òÕßÓÃpythonµÄtime.asctime()¶¼ÊÇÕýÈ·µÄʱ¼ä.

ÔÚ08-1-7£¬tairan wang <python在tairan.net> дµÀ£º
>
>
> 1. 2̨»úÆ÷£¿
> 2. Èç¹ûÊÇ2̨»úÆ÷£¬Server µÄʱÇøÊÇʲô£¬ Client µÄʱÇøÓÖÊÇʲô£¿
>
>
> ------------------------------
> Date: Mon, 7 Jan 2008 16:33:12 +0800
> From: askfor在gmail.com
> To: python-chinese在lists.python.cn
> Subject: Re: [python-chinese] loggingÄ£¿é´¦Àíʱ¼äΪʲô»á²î¾à¸öСʱ,ÓÐË­Óöµ½¹ýÂð?
>
> ʱÇø ʱ²î£¿
>
> On 1/7/08, *Arui Zen* <dujunfly在gmail.com> wrote:
>
> ³ÌÐòÀïÃæÓÃÁËlogging,ĬÈϵÄasctimeÊä³öµÄʱ¼äÔçÁË8¸öСʱ,±ÈÈçÏÖÔÚÊÇ15:45,ËüÊä³öµÄÊÇ05:45,ÎҵĴúÂë:
> ÎÒÒѾ­ÏÔʽָ¶¨ÁËdatefmtΪĬÈϸñʽ,
>
> logger=logging.getLogger ('IMR')
> logger.setLevel(logging.DEBUG)
> imrFormatter = logging.Formatter('%(asctime)s |##|
> %(message)s',datefmt='%Y-%m-%d %H:%M:%S')
>
>
> ƽ̨:
> ubuntu server 7.10
> ʱÇø: Asia/Shanghai
>
> ÓÃpython²é¿´:
> >>> import time
> >>> time.asctime()
> 'Mon Jan  7 15:48:34 2008'
> >>>
>
> È»ºó³ÌÐòµÄÊä³ö»¹ÊÇÀàËÆÓÚ
> 2008-01-07 07:33:39 |##|
> ÕâÑùµÄ¸ñʽ,ÕûÕûÔçÁË8Сʱ,
>
> ÔÚÁíһ̨RHELÉÏÔËÐÐÒ²ÊÇÒ»ÑùµÄÇé¿ö,,,,
> ÓÐË­Óöµ½¹ýÀàËÆÇé¿öÂð?ÇëÖ¸½Ì.
>
> --
>
> DJ
> _______________________________________________
> python-chinese
> Post: send python-chinese在lists.python.cn
> Subscribe: send subscribe to python-chinese-request在lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>
>
>
> ------------------------------
> Express yourself instantly with MSN Messenger! MSN Messenger<http://clk.atdmt.com/AVE/go/onm00200471ave/direct/01/>
>
> _______________________________________________
> python-chinese
> Post: send python-chinese在lists.python.cn
> Subscribe: send subscribe to python-chinese-request在lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>



-- 

DJ
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20080107/85e5d5c0/attachment.htm 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

如下红色区域有误,请重新填写。

    你的回复:

    请 登录 后回复。还没有在Zeuux哲思注册吗?现在 注册 !

    Zeuux © 2024

    京ICP备05028076号