step-examples/12-8-mixed/M133.stp
Sources
- 16-iso-spec ISO 10303-203 §5.7 (date_and_time / timezone)
- bug-reporter language: "STEP dates inconsistent timezone", "AP203 mixed date format", "naive timestamp in PDM file".
Sender
deduced — PDM exporter merging timestamps from two systems with different timezone-handling conventions
Description
One `DATE_AND_TIME` in the file captures a `LOCAL_TIME` with no `COORDINATED_UNIVERSAL_TIME_OFFSET` (timezone-naive); another in the same file uses an explicit UTC offset. Comparing the two requires assuming a timezone for the naive value. Bug-reporter language: "AP203 timezone mismatch", "STEP timestamp naive vs aware".
Reproducer recipe
`DATE_AND_TIME(..,LOCAL_TIME(14,30,0.0,$))` and `DATE_AND_TIME(..,LOCAL_TIME(14,30,0.0, COORDINATED_UNIVERSAL_TIME_OFFSET(0,0,.AHEAD.)))` in the same file.
Expected kernel behavior
warn on mixed timezone-aware / timezone-naive timestamps; or reject. Should not silently compare.
Notes
Synonyms: "AP203 date format inconsistent", "naive vs aware timestamp", "timezone-mixing".
Expected validation
occt=empty/empty gmsh=empty ifc=schema_n/a
Byte assertions
contains(b'CONFIG_CONTROL_DESIGN')count_entity_def(b'DATE_AND_TIME') >= 2contains(b'COORDINATED_UNIVERSAL_TIME_OFFSET')
Tier-3 assertions
shape_null == True
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1ISO-10303-21; 2/* M133: AP203 inconsistent ISO 8601 date formats â mixed naive/aware timestamps */ 3/* DEFECT: one DATE_AND_TIME is timezone-naive (offset=$); another has explicit UTC offset */ 4/* Comparing or ordering these timestamps requires assuming a timezone for the naive one */ 5/* Per AP203 §5.7 consistent timezone handling is required for reliable PDM audit trails */ 6/* Byte assertion: contains(b'CONFIG_CONTROL_DESIGN') */ 7/* Byte assertion: count_entity_def(b'DATE_AND_TIME') >= 2 */ 8/* Byte assertion: contains(b'COORDINATED_UNIVERSAL_TIME_OFFSET') */ 9HEADER; 10FILE_DESCRIPTION(('M133: AP203 mixed timezone-naive and timezone-aware DATE_AND_TIME'),'2;1'); 11FILE_NAME('M133.stp','2026-06-21T00:00:00',(''),(''),'cad-research-suite','',''); 12/* Byte assertion: contains(b'CONFIG_CONTROL_DESIGN') */ 13FILE_SCHEMA(('CONFIG_CONTROL_DESIGN { 1 0 10303 203 1 0 0 }')); 14ENDSEC; 15DATA; 16#1=APPLICATION_CONTEXT('configuration controlled 3D designs of mechanical parts and assemblies'); 17#2=APPLICATION_PROTOCOL_DEFINITION('international standard', 18 'config_control_design',1994,#1); 19/* Standard unit context (mm) */ 20#10=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 21#11=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 22#12=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 23#13=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(0.001),#10, 24 'distance_accuracy_value','maximum model space distance between geometric entities'); 25#14=(GEOMETRIC_REPRESENTATION_CONTEXT(3) 26 GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#13)) 27 GLOBAL_UNIT_ASSIGNED_CONTEXT((#10,#11,#12)) 28 REPRESENTATION_CONTEXT('ctx','3D')); 29/* Calendar dates for creation and modification events */ 30#20=CALENDAR_DATE(2024,3,15); 31#21=CALENDAR_DATE(2024,7,22); 32/* Byte assertion: count_entity_def(b'DATE_AND_TIME') >= 2 */ 33/* DEFECT: LOCAL_TIME with null offset â timezone-naive, cannot determine UTC equivalent */ 34/* This was written by a legacy PDM system that did not record timezone information */ 35#22=LOCAL_TIME(14,30,0.0,$); 36/* Byte assertion: contains(b'COORDINATED_UNIVERSAL_TIME_OFFSET') */ 37/* UTC+0 offset used by the newer system for the modification timestamp */ 38#23=COORDINATED_UNIVERSAL_TIME_OFFSET(0,0,.AHEAD.); 39/* Timezone-aware LOCAL_TIME with explicit UTC+0 offset */ 40#24=LOCAL_TIME(9,15,0.0,#23); 41/* First DATE_AND_TIME: creation date 2024-03-15T14:30:00 â NAIVE (no tz) */ 42/* DEFECT contributor: this timestamp cannot be compared with #26 without tz assumption */ 43#25=DATE_AND_TIME(#20,#22); 44/* Second DATE_AND_TIME: modification date 2024-07-22T09:15:00+00:00 â AWARE */ 45/* This is timezone-aware; comparing #25 vs #26 requires guessing tz for #25 */ 46#26=DATE_AND_TIME(#21,#24); 47/* Product that has both timestamps attached */ 48#30=PRODUCT('PART-055','Control Housing','Main housing for control unit',(#1)); 49#31=PRODUCT_DEFINITION_FORMATION('rev_A','Initial release',#30); 50#32=PRODUCT_DEFINITION('design','',#31,PRODUCT_DEFINITION_CONTEXT(#1,'design')); 51/* DATE role assignments: 'creation_date' (naive) and 'last_modified' (aware) */ 52#40=APPLIED_DATE_AND_TIME_ASSIGNMENT(#25,DATE_TIME_ROLE('creation_date'),(#32)); 53#41=APPLIED_DATE_AND_TIME_ASSIGNMENT(#26,DATE_TIME_ROLE('last_modified'),(#32)); 54/* GEOMETRIC_CURVE_SET IS the model entity â OCC yields empty */ 55#500=GEOMETRIC_CURVE_SET('ap203-mixed-timezone-naive-aware-dates', 56 (#22,#23,#24,#25,#26,#30,#32,#40,#41)); 57/* Product chain */ 58#600=APPLICATION_CONTEXT('mechanical design'); 59#601=PRODUCT_CONTEXT('',#600,'mechanical'); 60#602=PRODUCT('M133','M133','M133',(#601)); 61#603=PRODUCT_DEFINITION_FORMATION('','',#602); 62#604=PRODUCT_DEFINITION_CONTEXT(#600,'design'); 63#605=PRODUCT_DEFINITION('','',#603,#604); 64#606=PRODUCT_DEFINITION_SHAPE('','',#605); 65#607=SHAPE_REPRESENTATION('',(#500),#14); 66#608=SHAPE_DEFINITION_REPRESENTATION(#606,#607); 67ENDSEC; 68END-ISO-10303-21;