syspy 0.0.27 → 0.0.28
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/tds_packages/tds_params.rb +6 -8
- metadata +4 -4
@@ -41,10 +41,10 @@ module Syspy
|
|
41
41
|
raise "Unhandled data type: #{TdsTypes.name(data_type)} (0x#{data_type.to_s(16)})"
|
42
42
|
end
|
43
43
|
end
|
44
|
+
|
45
|
+
TIME_DIFF = Time.at(0).utc - Time.utc(1900,1,1)
|
44
46
|
|
45
|
-
|
46
|
-
|
47
|
-
def read_datetime(io,data_type)
|
47
|
+
def read_datetime(io,data_type)
|
48
48
|
case data_type
|
49
49
|
when TdsTypes::SYBDATETIMN
|
50
50
|
len = read_uint(io)
|
@@ -53,20 +53,18 @@ module Syspy
|
|
53
53
|
else
|
54
54
|
len = 8;
|
55
55
|
end
|
56
|
-
|
57
|
-
#gmt_offset = Time.new().gmt_offset
|
58
|
-
|
56
|
+
|
59
57
|
case len
|
60
58
|
when 0
|
61
59
|
return nil
|
62
60
|
when 8
|
63
61
|
days = read_int32(io)
|
64
62
|
time = read_int32(io)
|
65
|
-
return Time.at(days * 24 * 3600 - TIME_DIFF + time / 300)
|
63
|
+
return Time.at(days * 24 * 3600 - TIME_DIFF + time / 300).utc
|
66
64
|
when 4
|
67
65
|
days = read_int16le(io)
|
68
66
|
time = read_int16le(io)
|
69
|
-
return Time.at(days * 24 * 3600 + time * 60)
|
67
|
+
return Time.at(days * 24 * 3600 + time * 60).utc
|
70
68
|
end
|
71
69
|
end
|
72
70
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: syspy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.28
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-02-
|
12
|
+
date: 2013-02-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bindata
|
16
|
-
requirement: &
|
16
|
+
requirement: &19613400 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *19613400
|
25
25
|
description: ! 'Captures TDS (Sybase / MSSQL) packages directly from a network interface.
|
26
26
|
|
27
27
|
|