Skip to content

Commit

Permalink
use midday for Ibs to week
Browse files Browse the repository at this point in the history
  • Loading branch information
smuzaffar committed Oct 14, 2024
1 parent a3d761c commit d773647
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmsutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ def epoch2week(epoch_sec, week_offset=4):

def cmsswIB2Week(release, week_offset=4):
from datetime import datetime

rel_sec = int(datetime.strptime(release.split("_")[-1], "%Y-%m-%d-%H%M").strftime("%s"))
rel_date = "-".join(release.split("_")[-1].split("-")[:-1])+"-1200"
rel_sec = int(datetime.strptime(rel_date, "%Y-%m-%d-%H%M").strftime("%s"))
return (epoch2week(rel_sec, week_offset), rel_sec)


Expand Down

0 comments on commit d773647

Please sign in to comment.