Commit ddc01f5e by Juan Pablo dure

Muevo delta time a configuraccion

1 parent 2646905b
carpetaDescargas = "/home/juan/Descargas/" carpetaDescargas = "/home/juan/Descargas/"
cabezaeraDescargas = "Planilla_Diaria-54" cabezaeraDescargas = "Planilla_Diaria-54"
grepfile = "/home/juan/Pruebas-RTO/grep.sh"
\ No newline at end of file \ No newline at end of file
grepfile = "/home/juan/Pruebas-RTO/grep.sh"
deltaminutos = 7
delataPositivoNegativo = "-"
\ No newline at end of file \ No newline at end of file
import datetime import datetime
from time import sleep from time import sleep
import os, subprocess import os, subprocess, configuracion
from configuracion import * from configuracion import *
import pandas as pd import pandas as pd
...@@ -89,8 +89,12 @@ class FosaDiaria(): ...@@ -89,8 +89,12 @@ class FosaDiaria():
def CorreccionDeHora(self,fin, dia): def CorreccionDeHora(self,fin, dia):
"""Hora de finalizacion menos 10 minutos""" """Hora de finalizacion menos 10 minutos"""
strdatetime = f"{dia} {fin}" strdatetime = f"{dia} {fin}"
delta = datetime.timedelta(minutes=11) delta = datetime.timedelta(minutes=configuracion.deltaminutos)
obj = datetime.datetime.strptime(strdatetime, date_format_cent) - delta tmp = datetime.datetime.strptime(strdatetime, date_format_cent)
if configuracion.delataPositivoNegativo == "-":
obj = tmp - delta
else:
obj = tmp + delta
return obj.strftime(hora_format_cent) 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!