Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

242
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda