在vbscript中处理时区 [英] Dealing with timezones in vbscript

查看:108
本文介绍了在vbscript中处理时区的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用vbs更改一些旧的.asp文件.我们的数据库将转换为UTC的存储日期,但是在网页上,数据库应该显示欧洲/赫尔辛基"时区的日期和时间(

I'm trying to change some old .asp files with vbs. Our database is going to be converted to store dates in UTC, but on webpages it should show dates and time in "Europe/Helsinki" timezone(

TimeZoneInfo.FindSystemTimeZoneById("FLE Standard Time")

在C#中为

).如何使用dbquery转换从数据库查询中获得的UTC日期(查询也在.asp文件中运行,并将结果放入表中)以使用vbscript校正日期时间?

in c#). How can I cast the UTC date I get from db query( the query is run in the .asp file as well and the result put into table) to correct date time using vbscript?

推荐答案

只需使用

注意:这种方法的一个问题是,您还必须根据以下时间手动补偿EET和EEST (东欧夏季时间)年.当您考虑到某些地方不使用它而全年使用EET时,这也更加困难.
请参见
EET –东欧时间(标准时间).

Note: One problem with this approach is you will also have to compensate for EET and EEST (Eastern European Summer Time) manually based on the time of year. Which is also more difficult when you take into consideration some places don't use it and use EET all year round instead.
See EET – Eastern European Time (Standard Time).

根据所使用的RDMS,您甚至应该能够在日期作为初始查询的一部分到达页面之前对其进行操作.

Depending on the RDMS you are using you should even be able to manipulate the dates before they get to the page as part of the initial query.

  • Format current date and time
  • How to format a datetime with minimal separators and timezone in VBScript?

这篇关于在vbscript中处理时区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆