#!/usr/bin/env python3
"""
Test script to verify date generation for S3 paths
"""

from datetime import datetime, timezone

def test_timestamp_prefix():
    """Test the timestamp prefix generation"""
    now = datetime.now(timezone.utc)
    timestamp_prefix = now.strftime("%Y/%m/%d")
    
    print(f"Current UTC time: {now}")
    print(f"Generated timestamp prefix: {timestamp_prefix}")
    print(f"Expected format: YYYY/MM/DD")
    
    # Verify it's the current date
    current_date = datetime.now().strftime("%Y/%m/%d")
    print(f"Current date (local): {current_date}")
    
    return timestamp_prefix

if __name__ == "__main__":
    print("Testing S3 date generation...")
    prefix = test_timestamp_prefix()
    print(f"✅ Generated prefix: {prefix}")
    
    # Check if it's today's date
    today = datetime.now().strftime("%Y/%m/%d")
    if prefix == today:
        print("✅ Date generation is working correctly!")
    else:
        print(f"❌ Date mismatch! Expected: {today}, Got: {prefix}")
