INNER CODE UNIT · Python

parse_timestamp

softaworks/agent-toolkit · skills/daily-meeting-update/scripts/claude_digest.py:65

def parse_timestamp(timestamp: str) -> Optional[datetime]:
    """Parse ISO timestamp string to datetime."""
    if not timestamp:
        return None
    try:
        if 'T' in timestamp:
            timestamp = timestamp.split('+')[0].split('Z')[0]
            if '.' in timestamp:
                return datetime.strptime(timestamp[:26], '%Y-%m-%dT%H:%M:%S.%f')
            return datetime.strptime(timestamp[:19], '%Y-%m-%dT%H:%M:%S')
        return datetime.strptime(timestamp[:10], '%Y-%m-%d')
    except (ValueError, IndexError):
        return None


def extract_text_content(content) -> str:
    """Extract plain text from message content."""
    if isinstance(content, str):

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…