Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

strptime

convert time GMT to UTC

August 22, 2022 by Magenaut

I am trying to convert a time that I receive with GMT time but I render details by time format using strptime.

Categories Python, Q&A Tags python, strptime, time Leave a comment

Get date from week number

August 20, 2022 by Magenaut

Please what’s wrong with my code:

Categories Python, Q&A Tags datetime, python, strptime Leave a comment

A faster strptime?

August 20, 2022 by Magenaut

I have code which reads vast numbers of dates in ‘YYYY-MM-DD’ format. Parsing all these dates, so that it can add one, two, or three days then write back in the same format is slowing things down quite considerably.

Categories Python, Q&A Tags datetime, performance, python, strptime Leave a comment

How can I account for period (AM/PM) using strftime?

August 18, 2022 by Magenaut

Specifically I have code that simplifies to this:

Categories Python, Q&A Tags datetime, python, strptime Leave a comment

Parsing datetime strings containing nanoseconds

August 18, 2022 by Magenaut

I have some log files with times in the format HH:MM::SS.nano_seconds (e.g. 01:02:03.123456789). I would like to create a datetime in python so I can neatly do math on the time (e.g. take time differences). strptime works well for microseconds using %f. Do the Python datetime and time modules really not support nanoseconds?

Categories Python, Q&A Tags datetime, python, strptime, time-precision Leave a comment

How to format date string via multiple formats in python

August 17, 2022 by Magenaut

I have three date formats: YYYY-MM-DD, DD.MM.YYYY, DD/MM/YYYY.

Categories Python, Q&A Tags date, datetime, format, python, strptime Leave a comment

How to convert integer into date object python?

August 13, 2022 by Magenaut

I am creating a module in python, in which I am receiving the date in integer format like 20120213, which signifies the 13th of Feb, 2012. Now, I want to convert this integer formatted date into a python date object.

Categories Python, Q&A Tags date, python, python-2.7, python-datetime, strptime Leave a comment
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress