lmazuel: Without the PR, trying to deserialize in a french VM:
```python
>>> from msrest.serialization import Deserializer
>>> Deserializer.deserialize_rfc("Mon, 20 Nov 1995 19:12:08 -0500")
Traceback (most recent call last):
  File "/home/lmazuel/rfctest/lib/python3.6/site-packages/msrest/serialization.py", line 1818, in deserialize_rfc
    attr, "%a, %d %b %Y %H:%M:%S %Z")
  File "/usr/lib/python3.6/_strptime.py", line 565, in _strptime_datetime
    tt, fraction = _strptime(data_string, format)
  File "/usr/lib/python3.6/_strptime.py", line 362, in _strptime
    (data_string, format))
ValueError: time data 'Mon, 20 Nov 1995 19:12:08 -0500' does not match format '%a, %d %b %Y %H:%M:%S %Z'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/lmazuel/rfctest/lib/python3.6/site-packages/msrest/serialization.py", line 1823, in deserialize_rfc
    raise_with_traceback(DeserializationError, msg, err)
  File "/home/lmazuel/rfctest/lib/python3.6/site-packages/msrest/exceptions.py", line 51, in raise_with_traceback
    raise error.with_traceback(exc_traceback)
  File "/home/lmazuel/rfctest/lib/python3.6/site-packages/msrest/serialization.py", line 1818, in deserialize_rfc
    attr, "%a, %d %b %Y %H:%M:%S %Z")
  File "/usr/lib/python3.6/_strptime.py", line 565, in _strptime_datetime
    tt, fraction = _strptime(data_string, format)
  File "/usr/lib/python3.6/_strptime.py", line 362, in _strptime
    (data_string, format))
msrest.exceptions.DeserializationError: Cannot deserialize to rfc datetime object., ValueError: time data 'Mon, 20 Nov 1995 19:12:08 -0500' does not match format '%a, %d %b %Y %H:%M:%S %Z'
```

With the PR:
```python
>>> from msrest.serialization import Deserializer
>>> Deserializer.deserialize_rfc("Mon, 20 Nov 1995 19:12:08 -0500")
datetime.datetime(1995, 11, 20, 19, 12, 8, tzinfo=<FixedOffset -5.0>)
```
diff --git a/msrest/serialization.py b/msrest/serialization.py
index 59187e1..0e65d8e 100644
--- a/msrest/serialization.py
+++ b/msrest/serialization.py
@@ -28,6 +28,7 @@ from base64 import b64decode, b64encode
 import calendar
 import datetime
 import decimal
+import email
 from enum import Enum
 import json
 import logging
@@ -78,6 +79,26 @@ class UTC(datetime.tzinfo):
         """No daylight saving for UTC."""
         return datetime.timedelta(hours=1)
 
+class _FixedOffset(datetime.tzinfo):
+    """Fixed offset in minutes east from UTC.
+    Copy/pasted from Python doc
+    :param int offset: offset in minutes
+    """
+
+    def __init__(self, offset):
+        self.__offset = datetime.timedelta(minutes=offset)
+
+    def utcoffset(self, dt):
+        return self.__offset
+
+    def tzname(self, dt):
+        return str(self.__offset.total_seconds()/3600)
+
+    def __repr__(self):
+        return "<FixedOffset {}>".format(self.tzname(None))
+
+    def dst(self, dt):
+        return datetime.timedelta(0)
 
 try:
     from datetime import timezone
@@ -1814,10 +1835,13 @@ class Deserializer(object):
         if isinstance(attr, ET.Element):
             attr = attr.text
         try:
-            date_obj = datetime.datetime.strptime(
-                attr, "%a, %d %b %Y %H:%M:%S %Z")
+            parsed_date = email.utils.parsedate_tz(attr)
+            date_obj = datetime.datetime(
+                *parsed_date[:6],
+                tzinfo=_FixedOffset((parsed_date[9] or 0)/60)
+            )
             if not date_obj.tzinfo:
-                date_obj = date_obj.replace(tzinfo=TZ_UTC)
+                date_obj = date_obj.astimezone(tz=TZ_UTC)
         except ValueError as err:
             msg = "Cannot deserialize to rfc datetime object."
             raise_with_traceback(DeserializationError, msg, err)

Parsing RFC date assumes current local is English
Example, trying to parse `Fri, 28 Feb 2020 19:04:06 GMT` with a spanish locale will fail, since "Fri" or "Feb" is not spanish.
This is because this parser uses `strptime` which is local dependent. Python doesn't support configuration for locale.

The only reliable way would be to stop using "strptime", since other solution like [this ](https://stackoverflow.com/a/24070673/4074838)relies on a thread lock and I don't like that.
diff --git a/tests/test_serialization.py b/tests/test_serialization.py
index 12a0042..fffd8a9 100644
--- a/tests/test_serialization.py
+++ b/tests/test_serialization.py
@@ -1974,6 +1974,55 @@ class TestRuntimeDeserialized(unittest.TestCase):
         self.assertEqual(utc.tm_sec, 52)
         self.assertEqual(a.microsecond, 780000)
 
+    def test_deserialize_datetime_rfc(self):
+
+        a = Deserializer.deserialize_rfc("Mon, 20 Nov 1995 19:12:08 -0500")
+        utc = a.utctimetuple()
+
+        # UTC: 21 Nov, 00:12:08
+        self.assertEqual(utc.tm_year, 1995)
+        self.assertEqual(utc.tm_mon, 11)
+        self.assertEqual(utc.tm_mday, 21)
+        self.assertEqual(utc.tm_hour, 0)
+        self.assertEqual(utc.tm_min, 12)
+        self.assertEqual(utc.tm_sec, 8)
+        self.assertEqual(a.microsecond, 0)
+
+        a = Deserializer.deserialize_rfc("Mon, 20 Nov 1995 19:12:08 CDT")
+        utc = a.utctimetuple()
+
+        # UTC: 21 Nov, 00:12:08
+        self.assertEqual(utc.tm_year, 1995)
+        self.assertEqual(utc.tm_mon, 11)
+        self.assertEqual(utc.tm_mday, 21)
+        self.assertEqual(utc.tm_hour, 0)
+        self.assertEqual(utc.tm_min, 12)
+        self.assertEqual(utc.tm_sec, 8)
+        self.assertEqual(a.microsecond, 0)
+
+        a = Deserializer.deserialize_rfc("Mon, 20 Nov 1995 19:12:08")
+        utc = a.utctimetuple()
+
+        # UTC: No info is considered UTC
+        self.assertEqual(utc.tm_year, 1995)
+        self.assertEqual(utc.tm_mon, 11)
+        self.assertEqual(utc.tm_mday, 20)
+        self.assertEqual(utc.tm_hour, 19)
+        self.assertEqual(utc.tm_min, 12)
+        self.assertEqual(utc.tm_sec, 8)
+        self.assertEqual(a.microsecond, 0)
+
+        a = Deserializer.deserialize_rfc("Mon, 20 Nov 1995 19:12:08 GMT")
+        utc = a.utctimetuple()
+
+        self.assertEqual(utc.tm_year, 1995)
+        self.assertEqual(utc.tm_mon, 11)
+        self.assertEqual(utc.tm_mday, 20)
+        self.assertEqual(utc.tm_hour, 19)
+        self.assertEqual(utc.tm_min, 12)
+        self.assertEqual(utc.tm_sec, 8)
+        self.assertEqual(a.microsecond, 0)
+
     def test_polymorphic_deserialization(self):
 
         class Zoo(Model):

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest
apt-get update apt-get install -y gcc libunwind8-dev
3.9
requirements/base.txt dev_requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
aiohappyeyeballs==2.6.1
aiohttp==3.11.14
aiosignal==1.3.2
astroid==3.3.9
async-timeout==5.0.1
attrs==25.3.0
certifi==2025.1.31
charset-normalizer==3.4.1
coverage==4.5.4
dill==0.3.9
exceptiongroup==1.2.2
frozenlist==1.5.0
httpretty==1.1.4
idna==3.10
iniconfig==2.1.0
isodate==0.7.2
isort==6.0.1
mccabe==0.7.0
-e git+https://github.com/Azure/msrest-for-python.git@9e2e6529ac3cc91454a859c01775493872b20e92#egg=msrest
multidict==6.2.0
mypy==1.15.0
mypy-extensions==1.0.0
oauthlib==3.2.2
outcome==1.3.0.post0
packaging==24.2
platformdirs==4.3.7
pluggy==1.5.0
propcache==0.3.1
pylint==3.3.6
pytest==8.3.5
pytest-asyncio==0.26.0
pytest-cov==2.10.1
requests==2.32.3
requests-oauthlib==2.0.0
sniffio==1.3.1
sortedcontainers==2.4.0
tomli==2.2.1
tomlkit==0.13.2
trio==0.29.0
typing_extensions==4.13.0
urllib3==2.3.0
yarl==1.18.3

name: msrest-for-python
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - aiohappyeyeballs==2.6.1
      - aiohttp==3.11.14
      - aiosignal==1.3.2
      - astroid==3.3.9
      - async-timeout==5.0.1
      - attrs==25.3.0
      - certifi==2025.1.31
      - charset-normalizer==3.4.1
      - coverage==4.5.4
      - dill==0.3.9
      - exceptiongroup==1.2.2
      - frozenlist==1.5.0
      - httpretty==1.1.4
      - idna==3.10
      - iniconfig==2.1.0
      - isodate==0.7.2
      - isort==6.0.1
      - mccabe==0.7.0
      - multidict==6.2.0
      - mypy==1.15.0
      - mypy-extensions==1.0.0
      - oauthlib==3.2.2
      - outcome==1.3.0.post0
      - packaging==24.2
      - platformdirs==4.3.7
      - pluggy==1.5.0
      - propcache==0.3.1
      - pylint==3.3.6
      - pytest==8.3.5
      - pytest-asyncio==0.26.0
      - pytest-cov==2.10.1
      - requests==2.32.3
      - requests-oauthlib==2.0.0
      - sniffio==1.3.1
      - sortedcontainers==2.4.0
      - tomli==2.2.1
      - tomlkit==0.13.2
      - trio==0.29.0
      - typing-extensions==4.13.0
      - urllib3==2.3.0
      - yarl==1.18.3
prefix: /opt/conda/envs/msrest-for-python

tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_datetime_rfc
tests/test_serialization.py::TestModelDeserialization::test_empty_enum_logs tests/test_serialization.py::TestModelDeserialization::test_model_kwargs tests/test_serialization.py::TestModelDeserialization::test_model_kwargs_logs tests/test_serialization.py::TestModelDeserialization::test_response tests/test_serialization.py::TestRuntimeSerialized::test_additional_properties tests/test_serialization.py::TestRuntimeSerialized::test_additional_properties_declared tests/test_serialization.py::TestRuntimeSerialized::test_additional_properties_manual tests/test_serialization.py::TestRuntimeSerialized::test_additional_properties_no_send tests/test_serialization.py::TestRuntimeSerialized::test_additional_properties_with_auto_model tests/test_serialization.py::TestRuntimeSerialized::test_attr_bool tests/test_serialization.py::TestRuntimeSerialized::test_attr_dict_simple tests/test_serialization.py::TestRuntimeSerialized::test_attr_duration tests/test_serialization.py::TestRuntimeSerialized::test_attr_enum tests/test_serialization.py::TestRuntimeSerialized::test_attr_int tests/test_serialization.py::TestRuntimeSerialized::test_attr_list_complex tests/test_serialization.py::TestRuntimeSerialized::test_attr_list_simple tests/test_serialization.py::TestRuntimeSerialized::test_attr_none tests/test_serialization.py::TestRuntimeSerialized::test_attr_sequence tests/test_serialization.py::TestRuntimeSerialized::test_attr_str tests/test_serialization.py::TestRuntimeSerialized::test_empty_list tests/test_serialization.py::TestRuntimeSerialized::test_json_with_xml_map tests/test_serialization.py::TestRuntimeSerialized::test_key_type tests/test_serialization.py::TestRuntimeSerialized::test_long_as_type_object tests/test_serialization.py::TestRuntimeSerialized::test_model_validate tests/test_serialization.py::TestRuntimeSerialized::test_obj_serialize_none tests/test_serialization.py::TestRuntimeSerialized::test_obj_with_malformed_map tests/test_serialization.py::TestRuntimeSerialized::test_obj_with_mismatched_map tests/test_serialization.py::TestRuntimeSerialized::test_polymorphic_serialization tests/test_serialization.py::TestRuntimeSerialized::test_serialize_datetime tests/test_serialization.py::TestRuntimeSerialized::test_serialize_direct_model tests/test_serialization.py::TestRuntimeSerialized::test_serialize_empty_iter tests/test_serialization.py::TestRuntimeSerialized::test_serialize_from_dict_datetime tests/test_serialization.py::TestRuntimeSerialized::test_serialize_int_as_iter_with_div tests/test_serialization.py::TestRuntimeSerialized::test_serialize_json_obj tests/test_serialization.py::TestRuntimeSerialized::test_serialize_object tests/test_serialization.py::TestRuntimeSerialized::test_serialize_primitive_types tests/test_serialization.py::TestRuntimeSerialized::test_serialize_query tests/test_serialization.py::TestRuntimeSerialized::test_serialize_str_as_iter tests/test_serialization.py::TestRuntimeSerialized::test_serialize_time tests/test_serialization.py::TestRuntimeSerialized::test_validate tests/test_serialization.py::TestRuntimeSerialized::test_validation_flag tests/test_serialization.py::TestRuntimeSerialized::test_validation_type tests/test_serialization.py::TestRuntimeDeserialized::test_additional_properties tests/test_serialization.py::TestRuntimeDeserialized::test_additional_properties_declared tests/test_serialization.py::TestRuntimeDeserialized::test_additional_properties_flattening tests/test_serialization.py::TestRuntimeDeserialized::test_additional_properties_not_configured tests/test_serialization.py::TestRuntimeDeserialized::test_array_deserialize tests/test_serialization.py::TestRuntimeDeserialized::test_attr_bool tests/test_serialization.py::TestRuntimeDeserialized::test_attr_enum tests/test_serialization.py::TestRuntimeDeserialized::test_attr_int tests/test_serialization.py::TestRuntimeDeserialized::test_attr_list_complex tests/test_serialization.py::TestRuntimeDeserialized::test_attr_list_in_list tests/test_serialization.py::TestRuntimeDeserialized::test_attr_list_simple tests/test_serialization.py::TestRuntimeDeserialized::test_attr_none tests/test_serialization.py::TestRuntimeDeserialized::test_attr_str tests/test_serialization.py::TestRuntimeDeserialized::test_basic_deserialization tests/test_serialization.py::TestRuntimeDeserialized::test_cls_method_deserialization tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_date tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_datetime tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_flattening tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_object tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_storage tests/test_serialization.py::TestRuntimeDeserialized::test_deserialize_time tests/test_serialization.py::TestRuntimeDeserialized::test_invalid_json tests/test_serialization.py::TestRuntimeDeserialized::test_long_as_type_object tests/test_serialization.py::TestRuntimeDeserialized::test_non_obj_deserialization tests/test_serialization.py::TestRuntimeDeserialized::test_obj_with_malformed_map tests/test_serialization.py::TestRuntimeDeserialized::test_obj_with_no_attr tests/test_serialization.py::TestRuntimeDeserialized::test_personalize_deserialization tests/test_serialization.py::TestRuntimeDeserialized::test_polymorphic_deserialization tests/test_serialization.py::TestRuntimeDeserialized::test_polymorphic_deserialization_with_escape tests/test_serialization.py::TestRuntimeDeserialized::test_polymorphic_missing_info tests/test_serialization.py::TestRuntimeDeserialized::test_robust_deserialization tests/test_serialization.py::TestModelInstanceEquality::test_model_instance_equality
msrest/serialization.py
msrest/serialization.py