diff options
-rw-r--r-- | export_mvt.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/export_mvt.py b/export_mvt.py index e50620f..c3690a9 100644 --- a/export_mvt.py +++ b/export_mvt.py @@ -459,6 +459,8 @@ def exportMVT(ds : gdal.Dataset, srs, extent = parseTilingScheme(default_options.get('tiling-scheme', None)) + last_modified_ns = max(last_modified.values()) * 1000000 if len(last_modified) > 0 else None + export_layers = {} mvtconf = {} for layername, layerdef in layers.items(): @@ -591,6 +593,10 @@ def exportMVT(ds : gdal.Dataset, dir_fd=dir_fd, compress=compress_metadata) + if last_modified_ns is not None: + os.utime(mvtname, ns=(last_modified_ns, last_modified_ns), + dir_fd=dir_fd, follow_symlinks=False) + try: # atomically exchange paths rename_exchange(mvtname, dst, olddirfd=dir_fd) |