asp里如何得到当前时间再加12小时的时间
asp吧
全部回复
仅看楼主
level 7
无真界 楼主
由于服务器在美国,所以相差12个小时,有什么算法没有
2014年10月16日 01点10分 1
level 5
localDateTime = DateAdd("h", 12, Now())
2014年10月16日 01点10分 2
多谢,但是时分秒还是和当前时间相差了一个多小时!
2014年10月16日 02点10分
level 5
localDateTime = DateAdd("h", 12, Now()) *本机时间增加12小时
localDateTime = DateAdd("n", 10, localDateTime) *本机时间再增加10分钟
localDateTime = DateAdd("s", 10, localDateTime) *本机时间再增加10秒
时差以小时为最小单位,一般校对到小时即可,特殊要求可参考以上实现
2014年10月16日 02点10分 3
多谢,解决了
2014年10月16日 02点10分
回复 泡泡龙海盗 :不客气
2014年10月16日 03点10分
level 12
这个问题 要精确解决 着实不易
可以使用 毫秒 进行计算
但是 还是有些 时差啊 润年啊 之类的
2014年10月16日 17点10分 4
level 10
我只知道php可以设置时区
2014年10月20日 16点10分 6
level 11
now1=now()+0.5 response.write now1 测试可以用
2014年10月21日 00点10分 7
1