From: Brian Candler Date: 2009-12-28T21:04:35+09:00 Subject: Re: unpack :( Brian Candler wrote: >>> systemdate.unpack("nccccccAcc") > => [2009, 12, 28, 11, 42, 40, 0, "+", 1, 0] > > i.e. 11:42:40.0 (tenths of a second) with a timezone of +01:00 Just to make this clear: you should not be using the "H" format converter. "H" gives you ASCII hex representation, for example the byte 0x07 is converted into the two ASCII characters "0" and "7", or vice versa. What you appear to have is a binary string, and you want the byte 0x07 to be converted to the number 7, or the pair of bytes 0x07 0xd9 to be converted to the number 2009. These are the "c" and "n" formats respectively. Type "ri String#unpack" at the command line for more info, or look at the rdoc on the web. -- Posted via http://www.ruby-forum.com/.