Commit ddc01f5e by Juan Pablo dure

Muevo delta time a configuraccion

1 parent 2646905b
carpetaDescargas = "/home/juan/Descargas/"
cabezaeraDescargas = "Planilla_Diaria-54"
grepfile = "/home/juan/Pruebas-RTO/grep.sh"
\ No newline at end of file
grepfile = "/home/juan/Pruebas-RTO/grep.sh"
deltaminutos = 7
delataPositivoNegativo = "-"
\ No newline at end of file
import datetime
from time import sleep
import os, subprocess
import os, subprocess, configuracion
from configuracion import *
import pandas as pd
......@@ -89,8 +89,12 @@ class FosaDiaria():
def CorreccionDeHora(self,fin, dia):
"""Hora de finalizacion menos 10 minutos"""
strdatetime = f"{dia} {fin}"
delta = datetime.timedelta(minutes=11)
obj = datetime.datetime.strptime(strdatetime, date_format_cent) - delta
delta = datetime.timedelta(minutes=configuracion.deltaminutos)
tmp = datetime.datetime.strptime(strdatetime, date_format_cent)
if configuracion.delataPositivoNegativo == "-":
obj = tmp - delta
else:
obj = tmp + delta
return obj.strftime(hora_format_cent)
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!