Giter Club home page Giter Club logo

Comments (10)

bjinwright avatar bjinwright commented on May 29, 2024

I believe you are correct.

from warrant.

armicron avatar armicron commented on May 29, 2024

It will not authenticate with %d, as it will have a leading zero.
@stephenoneal what python version and OS do you use?

http://stackoverflow.com/questions/904928/python-strftime-date-without-leading-0

from warrant.

stephenoneal avatar stephenoneal commented on May 29, 2024

python 3.4, Windows

from warrant.

stephenoneal avatar stephenoneal commented on May 29, 2024

oddly i changed it to datetime.datetime.utcnow().strftime("%a %b %d %H:%M:%S UTC %Y") locally and it's passing the PASSWORD_VERIFIER challenge

from warrant.

armicron avatar armicron commented on May 29, 2024

oddly i changed it to datetime.datetime.utcnow().strftime("%a %b %d %H:%M:%S UTC %Y") locally and it's passing the PASSWORD_VERIFIER challenge

It will fail on May 1.

p.s. To fix this issue the code should be compatible with Windows and Linux both.

from warrant.

bjinwright avatar bjinwright commented on May 29, 2024

Oh yeah, that happened at the beginning of this month.

from warrant.

stephenoneal avatar stephenoneal commented on May 29, 2024

my attention on this is not great right now. need more coffee..

import platform
windows_os = any(platform.win32_ver())

    timestamp = test_timestamp or \
                ( datetime.datetime.utcnow().strftime("%a %b %#d %H:%M:%S UTC %Y") if windows_os \
                else datetime.datetime.utcnow().strftime("%a %b %-d %H:%M:%S UTC %Y") )

from warrant.

bjinwright avatar bjinwright commented on May 29, 2024

@armicron I think @stephenoneal is proposing a way to detect the OS and format the string accordingly.

from warrant.

armicron avatar armicron commented on May 29, 2024

I can't test it on windows.

import sys


if sys.platform.startswith('win32'):
    format_string = "%a %b %#d %H:%M:%S UTC %Y"
else:
    format_string = "%a %b %-d %H:%M:%S UTC %Y"

timestamp = test_timestamp or datetime.datetime.utcnow().strftime(format_string)

from warrant.

bjinwright avatar bjinwright commented on May 29, 2024

Fixed in #28

from warrant.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.