time zones in POSIXct and xts, converting from GMT in R
我在
使用
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | > tail(SPY) SPY.Bid.Price SPY.Ask.Price SPY.Trade.Price SPY.Mid.Price SPY.Volume 2012-08-09 19:54:00 140.47 140.48 140.48 140.475 2372 2012-08-09 19:55:00 140.46 140.47 140.46 140.465 5836 2012-08-09 19:56:00 140.47 140.48 140.48 140.475 2538 2012-08-09 19:57:00 140.47 140.48 140.47 140.475 2209 2012-08-09 19:58:00 140.48 140.49 140.49 140.485 4943 2012-08-09 19:59:00 140.58 140.59 140.58 140.585 16780 > indexTZ(SPY) <-"America/New_York" > tail(SPY) SPY.Bid.Price SPY.Ask.Price SPY.Trade.Price SPY.Mid.Price SPY.Volume 2012-08-09 15:54:00 140.47 140.48 140.48 140.475 2372 2012-08-09 15:55:00 140.46 140.47 140.46 140.465 5836 2012-08-09 15:56:00 140.47 140.48 140.48 140.475 2538 2012-08-09 15:57:00 140.47 140.48 140.47 140.475 2209 2012-08-09 15:58:00 140.48 140.49 140.49 140.485 4943 2012-08-09 15:59:00 140.58 140.59 140.58 140.585 16780 Warning message: timezone of object (America/New_York) is different than current timezone (GMT). |