Skip to content

Default Timezone and daylight time hardcoded #191

@wilberforce

Description

@wilberforce

In the xsHost files the timezone and daylight time are hard coded:

static int32_t gTimeZoneOffset = -8 * 60 * 60;		// Menlo Park
static int16_t gDaylightSavings = 60 * 60;			// summer time

https://github.com/Moddable-OpenSource/moddable/blob/public/xs/platforms/esp/xsHost.c#L471-L472

These could be set up as a#define so they can be overridden in the build.

However, it might be more flexible if it was in the config section of the manifest.

We currently have:

"config": {
		"sntp": "pool.ntp.org",
	}

and this is picked up by "setup/network": "$(BUILD)/devices/esp/setup/network",

https://github.com/Moddable-OpenSource/moddable/blob/public/build/devices/esp/setup/network.js#L44

So perhaps the timezone details should be set here from the config?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions