Uname:Linux server.rehabsharif.com 5.14.0-611.54.3.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 7 16:31:24 EDT 2026 x86_64

Base Dir : /home/nobi37te/public_html

User : nobi37te


403WebShell
403Webshell
Server IP : 172.67.134.116  /  Your IP : 216.73.217.22
Web Server : Apache
System : Linux server.rehabsharif.com 5.14.0-611.54.3.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 7 16:31:24 EDT 2026 x86_64
User : nobi37te ( 1003)
PHP Version : 8.2.33
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3.9/site-packages/ansible/plugins/filter/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3.9/site-packages/ansible/plugins/filter/to_datetime.yml
DOCUMENTATION:
  name: to_datetime
  version_added: "2.4"
  short_description: Get C(datetime) from string
  description:
    - Using the input string attempt to create a matching Python C(datetime) object.
  notes:
    - For a full list of format codes for working with Python date format strings, see
      L(the Python documentation, https://docs.python.org/3/library/datetime.html#strftime-and-strptime-behavior).
  positional: _input
  options:
    _input:
      description: A string containing date time information.
      type: str
      required: true
    format:
      description: C(strformat) formatted string that describes the expected format of the input string.
      type: str

EXAMPLES: |

  # Get total amount of seconds between two dates. Default date format is %Y-%m-%d %H:%M:%S but you can pass your own format
  secsdiff: '{{ (("2016-08-14 20:00:12" | to_datetime) - ("2015-12-25" | to_datetime("%Y-%m-%d"))).total_seconds()  }}'

  # Get remaining seconds after delta has been calculated. NOTE: This does NOT convert years, days, hours, and so on to seconds. For that, use total_seconds()
  {{ (("2016-08-14 20:00:12" | to_datetime) - ("2016-08-14 18:00:00" | to_datetime)).seconds  }}
  # This expression evaluates to "12" and not "132". Delta is 2 hours, 12 seconds

  # get amount of days between two dates. This returns only number of days and discards remaining hours, minutes, and seconds
  {{ (("2016-08-14 20:00:12" | to_datetime) - ("2015-12-25" | to_datetime('%Y-%m-%d'))).days  }}

RETURN:
  _value:
    description: C(datetime) object from the represented value.
    type: raw

Youez - 2016 - github.com/yon3zu
LinuXploit