def track_to_json(pyTrack, manager):
    """Serialize a Track.
    Attributes of this dictionary are to be passed to the JavaScript Date
    constructor.

    Args:
        :param Track: Track object
        :param any: manager. Used for widget serialization.

    Returns:
        dict of Track elements (viz, source, sourceOptions and label)

    """
    if pyTrack is None:
        return None
    else:
        return dict(viz=pyTrack.viz, source=pyTrack.source, sourceOptions=
            pyTrack.sourceOptions, label=pyTrack.label)
