Method: ActiveDirectory::FieldType::Timestamp.encode

Defined in:
lib/active_directory/field_type/timestamp.rb

.encode(local_time) ⇒ Object

Encodes a local Time object (or the number of seconds since January 1, 1970) into a timestamp that the Active Directory server can understand (number of 100 nanosecond time units since January 1, 1600)



32
33
34
# File 'lib/active_directory/field_type/timestamp.rb', line 32

def self.encode(local_time)
	(local_time.to_i + AD_OFFSET) * AD_DIVISOR
end