#include <time.h> char *strptime(const char *buf, const char *format, struct tm *tm);
Запустите nginx и next.js в разных контейнерах.