Archived Forum Post

Index of archived forum posts

Question:

possible bug in ckstring-activex

Mar 20 '16 at 04:16
  1. ckstring parseDataRfc822() bug(?) , 2016-03-20 is not Mon, it is Sun day
  2. ckstring parseDataRfcxxx() always return UTC , and no indication of timezone ,am i right??
    is there any way to change the format as i want ?
  3. there is no rfc822 related property/method in ckdatetime . why ?
    
sample-code( vfp9.0 sp2, korea )
public go_dt, go_str

clear
go_dt = createobject("chilkat_9_5_0.ckdatetime")
go_str = createobject('chilkat_9_5_0.ckstring')

? 'go_dt.version = ', go_dt.Version                && 9.5.0.56
?  go_str.Version                                  && 9.5.0.56
? '---------------------------------------------------------------
? 'utcOffset = ', go_dt.UtcOffset                  && 32400
* ? go_dt.getasrfc822( )                           && error 
? go_dt.getAsRfc822(0)                             && sun, 20 Mar 2016 07:10:22 GMT 
? go_dt.getAsRfc822(1)                             && sun,20 Mar 2016 16:10:22 +0900
* ? go_dt.getAsRfc3339(0)                          && error, no-such-method 
? '---------------------------------------------------------------'
go_str.clear
? go_str.ParseDateRfc3339()                        && 1900-01-01 00:00:00
* ? go_str.ParseDateRfc3339(datetime())            && error, does not support collection 
? go_str.ParseDateRfc822()                         && 1900-01-01 00:00:00

go_str.clear
? go_str.AppendDateRfc3339(datetime())             && return null 
? go_str.str                                       && 2016-03-20T07:42:32Z -> zulu means UTC 
? go_str.ParseDateRfc3339()                        && 2016-03-20 07:42:32  -> UTC, no indication of timezone 
*? go_str.ParseDateRfc3339(0)                      && error

go_str.clear
? go_str.AppendDateRfc822(datetime())              && return null   
? go_str.str                                       && Mon, 20 Mar 2016 16:42:32 +0900   -> local-time
? go_str.ParseDateRfc822()                         && 2016-03-20 07:42:32  -> UTC