Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

248
Vistas
having trouble figuring one-line datetime calculation

im attempting to create a python script that log into local server via http request but it requires local time but i think its encrypted but not sure example: 2022.08.07.01.09.59 = 1659823799756 i took a look at the js code

 function getDuration(time) {
    let duration = 0;
    if (time.seconds) {
        duration += time.seconds * 1000;
    }
    if (time.minutes) {
        duration += time.minutes * 60 * 1000;
    }
    if (time.hours) {
        duration += time.hours * 60 * 60 * 1000;
    }
    if (time.days) {
        duration += time.days * 24 * 60 * 60 * 1000;
    }
    return duration;
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

It is not encrypted, it is the epoch / unix timestamp, which is the number of seconds since January 1, 1970 12:00:00 AM GMT. It can also be expressed in number of milliseconds (your case).

In Python you can get it with time.time(), to get the millis multiply it by 1000. If you need an integer value you have to round it, because time.time() returns a float.

timeMillis = int(round(time.time() * 1000))

See this link for the current Epoch in millis and for converters https://currentmillis.com/

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda