Sha256: fbd6c815371a25761e188e0769aa69e964733735fd5cef4cc73d435b46715497
Contents?: true
Size: 978 Bytes
Versions: 80
Compression:
Stored size: 978 Bytes
Contents
# (Documentation in 3.x stub) # # @since 4.8.0 # Puppet::Functions.create_function(:strftime) do dispatch :format_timespan do param 'Timespan', :time_object param 'String', :format end dispatch :format_timestamp do param 'Timestamp', :time_object param 'String', :format optional_param 'String', :timezone end dispatch :legacy_strftime do param 'String', :format optional_param 'String', :timezone end def format_timespan(time_object, format) time_object.format(format) end def format_timestamp(time_object, format, timezone = nil) time_object.format(format, timezone) end def legacy_strftime(format, timezone = nil) Puppet.warn_once('deprecation', 'legacy#strftime', 'The argument signature (String format, [String timezone]) is deprecated for #strfime. See #strftime documentation and Timespan type for more info') Puppet::Pops::Time::Timestamp.format_time(format, Time.now.utc, timezone) end end
Version data entries
80 entries across 80 versions & 2 rubygems