简体   繁体   English

BlueSky Statistics - 字符串到日期[时间]问题

[英]BlueSky Statistics - String to date [time] issues

Trying to convert time as a string to a time variable. 尝试将时间转换为字符串转换为时间变量。 Use Date/Dates/Convert String to Date...... for format I use %H:%M:%S.... Here is the syntax from the GUI 使用日期/日期/转换字符串到日期......对于格式我使用%H:%M:%S ....这是GUI的语法

[Convert String Variables to Date] [将字符串变量转换为日期]

BSkystrptime (varNames = c('Time'),dateFormat = "%H:%M:%S",prefixOrSuffix = "prefix",prefixOrSuffixValue = "Con_",data = "Dataset2") BSkyLoadRefreshDataframe(dframe=Dataset2,load.dataframe=TRUE) A screen shot of result is attached.... Compare variables Time [string] to Con_Time [date/time] The hours are 2 hours out [wrong!] - the Minutes and Seconds are correct. BSkystrptime(varNames = c('Time'),dateFormat =“%H:%M:%S”,prefixOrSuffix =“prefix”,prefixOrSuffixValue =“Con _”,data =“Dataset2”)BSkyLoadRefreshDataframe(dframe = Dataset2,load。 dataframe = TRUE)附加了结果的屏幕截图....比较变量时间[字符串]到Con_Time [日期/时间]小时是2小时[错误!] - 分钟和秒是正确的。 What am I doing wrong here? 我在这做错了什么? Screen Shot 屏幕截图

I believe you are running into a known issue with a prior release of BlueSky Statistics. 我相信你在BlueSky Statistics的早期版本中遇到了一个已知问题。 This issue is fixed with the current stable release available on the download page. 此问题已通过下载页面上提供的当前稳定版本修复。

The reason for this was although the time is converted correctly into the local time zone, BlueSky Statistics was reading the time zone in the local time zone and converting it to UTC. 原因是虽然时间被正确转换为本地时区,但BlueSky Statistics正在读取本地时区的时区并将其转换为UTC。

You are probably +2 hours ahead of UTC, so you are seeing the time move 2 hrs back. 你可能比UTC早了+2小时,所以你看到时间推移2小时。 Give us a couple of days to post a patch. 给我们几天发贴补丁。

You can also confirm this by writing and executing the following syntax in the syntax window 您还可以通过在语法窗口中编写并执行以下语法来确认这一点

Dataset2$Con_Time Dataset2 $ Con_Time

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM