'Get the date and time formats used by PlexPy.
Required parameters:
None
Optional parameters:
None
Returns:
json:
{"date_format": "YYYY-MM-DD",
"time_format": "HH:mm",'

@cherrypy.expose
@cherrypy.tools.json_out()
@requireAuth()
@addtoapi()
def get_date_formats(self, **kwargs):

    if plexpy.CONFIG.DATE_FORMAT:
        date_format = plexpy.CONFIG.DATE_FORMAT
    else:
        date_format = 'YYYY-MM-DD'
    if plexpy.CONFIG.TIME_FORMAT:
        time_format = plexpy.CONFIG.TIME_FORMAT
    else:
        time_format = 'HH:mm'
    formats = {'date_format': date_format, 'time_format': time_format}
    return formats
